This repository was archived by the owner on Mar 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (79 loc) · 2.33 KB
/
main.yml
File metadata and controls
84 lines (79 loc) · 2.33 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Run test file with command:
# act -j deploy-success
# act -j deploy-fail
name: Test
on: push
jobs:
deploy-success:
name: Deploying successfully
runs-on: ubuntu-latest
environment:
name: test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Notify - deployment started
uses: ./
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
base-uri: 'https://ld-stg.launchdarkly.com'
project-key: default
environment-key: test
status: in_progress
event-metadata: '
{
"actor": "${{ github.triggering_actor }}",
"ref_name": "${{ github.ref_name }}",
"ref_type": "${{ github.ref_type }}"
}'
- name: Deploying application
id: deploy
run: echo "Deploying the app..."
- name: Notify - deployment finished
uses: ./
if: always()
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
base-uri: 'https://ld-stg.launchdarkly.com'
project-key: default
environment-key: test
status: ${{ steps.deploy.outcome }}
deploy-fail:
name: Deploying fails
runs-on: ubuntu-latest
environment:
name: test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Notify - deployment started
uses: ./
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
base-uri: 'https://ld-stg.launchdarkly.com'
project-key: default
environment-key: test
application-key: failing-workflow
status: in_progress
event-metadata: '
{
"actor": "${{ github.triggering_actor }}",
"ref_name": "${{ github.ref_name }}",
"ref_type": "${{ github.ref_type }}"
}'
- name: Deploying application
id: deploy
continue-on-error: true
run: |
echo "Deploying the app..."
exit 1
- name: Notify - deployment finished
uses: ./
if: always()
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
base-uri: 'https://ld-stg.launchdarkly.com'
project-key: default
environment-key: test
application-key: failing-workflow
status: ${{ steps.deploy.outcome }}