generated from ExpediaGroup/new-project
-
Notifications
You must be signed in to change notification settings - Fork 28
55 lines (48 loc) · 1.46 KB
/
deployments.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Deployments
on:
pull_request:
branches: [main]
paths:
- 'src/helpers/delete-deployment.ts'
- 'src/helpers/initiate-deployment.ts'
- 'src/helpers/set-deployment-status.ts'
jobs:
initiate-deployment:
name: Initiate Deployment
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./
with:
helper: initiate-deployment
sha: ${{ github.event.pull_request.head.sha }}
environment: test
description: PR#${{ github.event.pull_request.number }} has been merged; pipeline in progress...
set-deployment-status:
name: Set Deployment Status
needs: [initiate-deployment]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./
with:
helper: set-deployment-status
sha: ${{ github.event.pull_request.head.sha }}
environment: test
state: success
description: Deployment succeeded.
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
delete-deployment:
name: Delete Deployment
needs: [initiate-deployment, set-deployment-status]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./
with:
helper: delete-deployment
sha: ${{ github.event.pull_request.head.sha }}
environment: test