-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.11 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy and Notify
on:
push:
branches:
- 'release/**'
- 'main'
jobs:
announce-on-release:
name: Announce Deploy to Slack for Release Branch
environment: Staging
if: ${{ github.ref != 'refs/heads/main' && contains(github.ref, 'release/') }}
runs-on: ubuntu-latest
steps:
- name: Announce to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: ${{ github.actor }}
text: "There is a deployment to *${{ github.ref }}* underway :oooo:"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
announce-on-main-merge:
name: Announce Merge to Main on Slack channel
environment: Production
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: Announce to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: ${{ github.actor }}
text: "A release branch has just been merged to *main* :tada:"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}