Skip to content

Commit

Permalink
Make preDeploy continue if lint and test succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Jun 28, 2022
1 parent 7da6439 commit 1432b08
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ jobs:
confirmPassingBuild:
runs-on: ubuntu-latest
needs: [lint, test]
if: ${{ always() && (needs.lint.result == 'failure' || needs.test.result == 'failure') }}
if: ${{ always() }}

steps:
- id: didBuildFail
run: echo "::set-output name=DID_BUILD_FAIL::${{ needs.lint.result == 'failure' || needs.test.result == 'failure' }}"

# This Slack step is duplicated in all workflows, if you make a change to this step, make sure to update all
# the other workflows with the same change
- uses: 8398a7/action-slack@v3
name: Job failed Slack notification
if: ${{ failure() }}
if: ${{ fromJSON(steps.didBuildFail.DID_BUILD_FAIL) }}
with:
status: custom
fields: workflow, repo
Expand All @@ -38,6 +41,9 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

- if: ${{ fromJSON(steps.didBuildFail.DID_BUILD_FAIL) }}
run: exit 1

chooseDeployActions:
runs-on: ubuntu-latest
needs: confirmPassingBuild
Expand Down

0 comments on commit 1432b08

Please sign in to comment.