Skip to content

Commit

Permalink
Fix racy workflows
Browse files Browse the repository at this point in the history
The merge_commit_sha seems to not always be calculated correctly, try to
use github.event.pull_request.head.sha instead.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
  • Loading branch information
frelon committed Mar 7, 2024
1 parent 334f4ee commit e9a93d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
ref: "${{ github.event.pull_request.head.sha }}"
- run: |
git fetch --prune --unshallow
- name: Log in to ghcr.io
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build_and_test_x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
ref: "${{ github.event.pull_request.head.sha }}"
- run: |
git fetch --prune --unshallow
- name: Log in to registry
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
ref: "${{ github.event.pull_request.head.sha }}"
- run: |
git fetch --prune --unshallow
- name: Cached ISO
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
ref: "${{ github.event.pull_request.head.sha }}"
- run: |
git fetch --prune --unshallow
- name: Checks cached Disk
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
fi
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
ref: "${{ github.event.pull_request.head.sha }}"
- id: image
env:
FLAVOR: ${{ inputs.flavor }}
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
ref: "${{ github.event.pull_request.head.sha }}"
- name: Install Go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
ref: "${{ github.event.pull_request.head.sha }}"
- name: Install Go
uses: actions/setup-go@v5
with:
Expand Down

0 comments on commit e9a93d1

Please sign in to comment.