Last active
June 16, 2020 16:03
-
-
Save yokawasa/b3e4c49c66ba9069f3904163ecf841d6 to your computer and use it in GitHub Desktop.
GitHub Actions Workflow Conclusion Test YAML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- workflow-conclusion | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- run: exit 0 | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- run: exit 1 | |
publish: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- run: exit 0 | |
#slack_notification: | |
# if: always() | |
# needs: publish | |
# runs-on: ubuntu-latest | |
# steps: | |
# - run: | | |
# echo "let's see the workflow conclusion" | |
# echo ${{ job.status }} | |
#slack_notification: | |
# if: always() | |
# needs: publish | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: technote-space/workflow-conclusion-action@v1 | |
# - run: | | |
# echo "let's see the workflow conclusion" | |
# echo ${{ env.WORKFLOW_CONCLUSION }} | |
slack-notification: | |
if: always() | |
needs: publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: technote-space/workflow-conclusion-action@v1 | |
- name: Slack Notification | |
uses: sonots/slack-notice-action@v3 | |
with: | |
title: My deployment | |
status: ${{ env.WORKFLOW_CONCLUSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.MY_GITHUB_CHANNEL_WEBHOOK }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment