Skip to content

Commit

Permalink
Fix: validate-deployment.yml job can't find deployment ref (#238)
Browse files Browse the repository at this point in the history
* Bump actions/checkout version

* Ensure checkout fetches deployment ref

* Don't run "Fail validation" step if job is already failing
  • Loading branch information
TylerHendrickson authored May 1, 2024
1 parent 90926da commit 64a2f0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/validate-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ jobs:
with:
disable-sudo: true
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
ref: ${{ env.PROTECTED_REF }}
fetch-depth: '0'
filter: 'tree:0'
show-progress: 'false'
persist-credentials: 'false'
- name: Count commits in candidate ref that are not in protected ref
Expand Down Expand Up @@ -69,7 +71,7 @@ jobs:
INVALID_CHERRY_COUNT: ${{ steps.missing-cherries.outputs.count }}
CHERRY_FILE: ${{ steps.all-cherries.outputs.file }}
- name: Fail validation
if: fromJson(steps.missing-cherries.outputs.count) > 0
if: success() && fromJson(steps.missing-cherries.outputs.count) > 0
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
Expand Down

0 comments on commit 64a2f0c

Please sign in to comment.