Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use github.event.pull_request.head.sha for checkout@v4 #1531

Merged
merged 3 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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