Skip to content

Commit

Permalink
ci(deploy): do not run versioning job when pushing to main (#4970)
Browse files Browse the repository at this point in the history
Previous behavior:
When a push was detected in the `main` branch, the workflow would run the
`versioning` job and crash trying to detect the version being deployed as
there was none.

Expected behavior:
Do not fail the `versioning` job when pushing to `main`

Solution:
Limit the `versioning` job to only run when a release event is triggered
and allow the `deploy-nodes` job to run even if `versioning` is skipped
  • Loading branch information
gustavovalverde authored Aug 28, 2022
1 parent f46d011 commit 58c4a62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/continous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
major_version: ${{ steps.set.outputs.major_version }}
if: ${{ github.event_name == 'release' }}
steps:
- name: Getting Zebrad Version
id: get
Expand Down Expand Up @@ -87,7 +88,7 @@ jobs:
permissions:
contents: 'read'
id-token: 'write'
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'release' }}
if: ${{ !cancelled() && !failure() && ((github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'release') }}

steps:
- name: Inject slug/short variables
Expand Down

0 comments on commit 58c4a62

Please sign in to comment.