Skip to content

Commit

Permalink
fix: use github.event.pull_request.head.sha for checkout@v4 (garris…
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrebb authored Dec 23, 2023
1 parent aefaa63 commit 169d7af
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/_backstop-docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ on:
branches: [master, develop]

permissions:
actions: write
checks: write
contents: write
pull-requests: write
packages: write

env:
BRANCH_NAME: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref_name }}
BRANCH_NAME: ${{ github.event.pull_request.head.sha || github.head_ref || github.ref_name }}

jobs:
backstop-sanity-test:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/backstop-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
workflow_call:

permissions:
actions: write
contents: write
pull-requests: write

Expand All @@ -20,7 +21,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/backstop-sanity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
workflow_call:

permissions:
actions: write
contents: write
pull-requests: write

Expand All @@ -20,7 +21,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
Expand All @@ -43,7 +44,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/backstop-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
workflow_call:

permissions:
actions: write
contents: write
pull-requests: write

Expand All @@ -20,7 +21,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
Expand All @@ -44,7 +45,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
workflow_call:

permissions:
actions: write
checks: write
contents: write
pull-requests: write
Expand All @@ -26,7 +27,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docker-sanity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
workflow_call:

permissions:
actions: write
checks: write
contents: write
pull-requests: write
Expand All @@ -30,7 +31,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
env:
Expand Down Expand Up @@ -78,7 +79,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
env:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docker-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
workflow_call:

permissions:
actions: write
checks: write
contents: write
pull-requests: write
Expand All @@ -30,7 +31,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
env:
Expand Down Expand Up @@ -78,7 +79,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: Set Name and Tag Vars
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-backstop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
workflow_call:

permissions:
actions: write
checks: write
contents: write
pull-requests: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
workflow_call:

permissions:
actions: write
checks: write
contents: write
pull-requests: write
Expand Down

0 comments on commit 169d7af

Please sign in to comment.