-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (60 loc) · 1.91 KB
/
deploybot.yaml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Deploybot
on:
workflow_dispatch:
pull_request:
paths:
- deploybot/**
- .github/workflows/deploybot.yaml
jobs:
e2e:
runs-on: ubuntu-latest
environment: e2e
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version-file: package.json
cache: yarn
- run: |
yarn install --frozen-lockfile
yarn workspace deploybot all
- name: The job has started
uses: ./deploybot
with:
status: started
token: ${{ secrets.SLACK_OAUTH_TOKEN }}
channel: ${{ secrets.SLACK_CHANNEL }}
- name: Generate image tags
id: tags
uses: ./docker-image-tag
with:
env: dev
suffix_type: auto
- name: The job has succeeded
uses: ./deploybot
with:
status: success
token: ${{ secrets.SLACK_OAUTH_TOKEN }}
channel: ${{ secrets.SLACK_CHANNEL }}
custom_fields: |
- title: ECR Repository
value: "```dummy```"
- title: Image Tags
value: "```${{ steps.tags.outputs.image_tag }}\n${{ steps.tags.outputs.latest_tag }}```"
- name: The job has failed
uses: ./deploybot
with:
status: failure
token: ${{ secrets.SLACK_OAUTH_TOKEN }}
channel: ${{ secrets.SLACK_CHANNEL }}
custom_fields: |
- title: ECR Repository
value: "```dummy```"
- title: Image Tags
value: "```${{ steps.tags.outputs.image_tag }}\n${{ steps.tags.outputs.latest_tag }}```"
- name: The job has been cancelled
uses: ./deploybot
with:
status: cancelled
token: ${{ secrets.SLACK_OAUTH_TOKEN }}
channel: ${{ secrets.SLACK_CHANNEL }}