Skip to content

Commit

Permalink
Extract notify job to build and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Feb 6, 2025
1 parent 92de45a commit 2574255
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,24 @@ jobs:
docker push ghcr.io/ruby/ruby:$tag
done
notify-deploy-slack:
needs: build
runs-on: ubuntu-latest
if: failure()
steps:
- uses: ruby/action-slack@54175162371f1f7c8eb94d7c8644ee2479fcd375 # v3.2.2
with:
payload: |
{
"attachments": [{
"text": "${{ job.status }}: <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}>",
"color": "danger"
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

deploy_multiarch:
strategy:
matrix:
Expand Down Expand Up @@ -147,8 +165,8 @@ jobs:
ubuntu_version="${{ matrix.ubuntu_version }}" \
image_version_suffix=${{ matrix.image_version_suffix }}
notify-slack:
needs: [ build, deploy_multiarch ]
notify-deploy-slack:
needs: deploy_multiarch
runs-on: ubuntu-latest
if: failure()
steps:
Expand Down

0 comments on commit 2574255

Please sign in to comment.