GitHub Actions Notifications To Slack

1. Navigate to your Slack Workspace created in 4.2 Create Slack Channels.

  • Expand the Apps dropdown.
  • Click Add apps.

0001

2. Filter with value github, click Add for GitHub.

0002

3. Click Add to Slack.

0003

4. Click Allow.

0004

5. In your Slack Workspace,

  • Select the GitHub app.
  • Click Connect GitHub account.

0005

6. Click Connect GitHub account.

0006

7. Copy the verification code.

0007

8. Back to the GitHub app in your Slack Workspace, click Enter code.

0008

9. Enter the code you have copied in the step 7 and click Submit.

0009

10. Enter invite @GitHub in the gha-ci channel and then click send icon.

00010

11. Click Invite them.

00011

12. Enter /github subscribe fcj-workshops-2024/awsome-books and then click send icon.

00012

13. Click Install GitHub App.

00013

14. Select fcj-workshops-2024 GitHub organization.

00014

15.

  • Select Only select repositories.
  • For Select repositories, filter with value awsome-books.
  • Select fcj-workshops-2024/awsome-books.

00015

16. Scroll down to the bottom, click Install.

00016

17. Enter /github subscribe list and then click send icon.

00017

Your gha-ci Slack channel should now be subscribed to fcj-workshops-2024/awsome-books repository.

00018

19. Unsubscribe the channel from default event subscriptions with /github unsubscribe fcj-workshops-2024/awsome-books issues pulls commits releases deployments command.

00019

20. Enter /github subscribe fcj-workshops-2024/awsome-books workflows:{name:"CI" event:"pull_request" branch:"main"} to subscribe to the CI workflow on “pull_request” event. Click the send icon.

00020

21. Apply the same steps (10 to 20) to the gha-merge-group, gha-release, and gha-rollback channels, but you can skip steps 13 through 16 for these.

In the step 20,

  • For gha-merge-group, enter /github subscribe fcj-workshops-2024/awsome-books workflows:{name:"CI" event:"merge_group"} to subscribe to the CI workflow on “merge_group” event.
  • For gha-release, enter /github subscribe fcj-workshops-2024/awsome-books workflows:{name:"Release" event:"push"} to subscribe to the Release workflow on “push” event.
  • For gha-rollback, enter /github subscribe fcj-workshops-2024/awsome-books workflows:{name:"Rollback" event:"workflow_dispatch"} to subscribe to the Rollback workflow on “workflow_dispatch” event.