Skip to content

Instantly share code, notes, and snippets.

@yokawasa
Last active June 16, 2020 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yokawasa/b3e4c49c66ba9069f3904163ecf841d6 to your computer and use it in GitHub Desktop.
Save yokawasa/b3e4c49c66ba9069f3904163ecf841d6 to your computer and use it in GitHub Desktop.
GitHub Actions Workflow Conclusion Test YAML
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