Integrating with Slack from GitHub Actions #6
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
name: cicd-workflow with slack integration | |
on: | |
push: | |
branches: [ "master" ] | |
jobs: | |
job1: | |
runs-on: ubuntu-latest | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
steps: | |
- uses: act10ns/slack@v2 | |
with: | |
status: starting | |
channel: '#mar-2024-weekend-batch' | |
message: Starting Docker Build image... | |
if: always() | |
- uses: actions/checkout@v3 | |
- name: Build Docker image | |
run: | | |
docker build -t my-docker-repo . | |
- name: slack - GitHub Actions Slack integration | |
- uses: act10ns/slack@v2 | |
with: | |
channel: '#mar-2024-weekday-batch' | |
status: ${{ job.status }} | |
steps: ${{ toJson(steps) }} | |
if: always() |