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: race condition in goreleaser workflow #15233

Merged
merged 2 commits into from
Nov 13, 2024
Merged
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
19 changes: 11 additions & 8 deletions .github/workflows/build-publish-develop-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ on:
default: "false"

env:
GIT_REF: ${{ github.event.inputs.git_ref || github.ref }}
# Use github.sha here otherwise a race condition exists if
# a commit is pushed to develop before merge is run.
CHECKOUT_REF: ${{ github.event.inputs.git_ref || github.sha }}


jobs:
merge:
Expand All @@ -38,7 +41,7 @@ jobs:
- name: Checkout repository
uses: actions/[email protected]
with:
ref: ${{ env.GIT_REF }}
ref: ${{ env.CHECKOUT_REF }}

- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
Expand All @@ -48,13 +51,13 @@ jobs:
mask-aws-account-id: true
role-session-name: "merge"

- uses: actions/cache/restore@v4
- uses: actions/cache/restore@v4.1.1
with:
path: dist/linux_amd64_v1
key: chainlink-amd64-${{ github.sha }}
fail-on-cache-miss: true

- uses: actions/cache/restore@v4
- uses: actions/cache/restore@v4.1.1
with:
path: dist/linux_arm64_v8.0
key: chainlink-arm64-${{ github.sha }}
Expand Down Expand Up @@ -91,7 +94,7 @@ jobs:
- name: Checkout repository
uses: actions/[email protected]
with:
ref: ${{ env.GIT_REF }}
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0

- name: Configure aws credentials
Expand All @@ -103,7 +106,7 @@ jobs:
role-session-name: "split-${{ matrix.goarch }}"

- id: cache
uses: actions/cache@v4
uses: actions/cache@v4.1.1
with:
path: dist/${{ matrix.dist_name }}
key: chainlink-${{ matrix.goarch }}-${{ github.sha }}
Expand All @@ -125,9 +128,9 @@ jobs:
release-type: ${{ steps.get-image-tag.outputs.release-type }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v4.2.1
with:
ref: ${{ env.GIT_REF }}
ref: ${{ env.CHECKOUT_REF }}

- name: Get image tag
id: get-image-tag
Expand Down
Loading