Skip to content

Commit

Permalink
ci(snap): cope with concurrent builds (#341)
Browse files Browse the repository at this point in the history
At the moment, the Pebble release process involves
a series of 3 commits under a very short amount of
time. GitHub's concurrency flag is being used to
cope with this, but it is unable to wait for
pending workflow runs, which raises the risk of
a Release workflow cancelling the previous
commit workflow, where the snap is being built,
if the run is pending, waiting for a GH runner.

This commit forces the snap build to happen on
releases also.
  • Loading branch information
cjdcordeiro authored Dec 15, 2023
1 parent bbd5ab2 commit ecac3d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

remote-build:
runs-on: ubuntu-latest
if: github.event_name == 'push'
if: github.event_name != 'pull_request'
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
release:
runs-on: ubuntu-latest
needs: [test]
if: github.event_name == 'push' && needs.test.result == 'success' && always()
if: github.event_name != 'pull_request' && needs.test.result == 'success' && always()
strategy:
fail-fast: false
matrix:
Expand All @@ -142,8 +142,9 @@ jobs:
release: ${{ env.DEFAULT_TRACK }}/${{ env.DEFAULT_RISK }}

promote:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
needs: [release]
if: github.event_name == 'release' && needs.release.result == 'success' && always()
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit ecac3d4

Please sign in to comment.