-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (66 loc) · 1.75 KB
/
Copy pathcicd-3-release.yaml
File metadata and controls
77 lines (66 loc) · 1.75 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
name: "CI/CD: Release"
# Prod requires a manual approval — configure required reviewers in GitHub
# Settings → Environments → prod before provisioning the prod environment.
on:
push:
tags:
- 'v*'
concurrency: release-${{ github.ref }}
permissions:
contents: write
id-token: write
attestations: write
security-events: write
jobs:
commit-stage:
uses: ./.github/workflows/stage-1-commit.yaml
secrets: inherit
test-stage:
needs: commit-stage
uses: ./.github/workflows/stage-2-test.yaml
secrets: inherit
build-stage:
needs: test-stage
uses: ./.github/workflows/stage-3-build.yaml
with:
version: ${{ github.ref_name }}
new_release_published: true
secrets: inherit
deploy-dev:
name: Deploy (dev)
needs: build-stage
uses: ./.github/workflows/stage-4-deploy-env.yaml
with:
environment: dev
release_tag: ${{ github.ref_name }}
commit_sha: ${{ github.sha }}
branch_name: main
secrets: inherit
deploy-preprod:
name: Deploy (preprod)
needs: deploy-dev
uses: ./.github/workflows/stage-4-deploy-env.yaml
with:
environment: preprod
release_tag: ${{ github.ref_name }}
commit_sha: ${{ github.sha }}
branch_name: main
secrets: inherit
prod-approval:
name: Awaiting prod approval
needs: deploy-preprod
runs-on: ubuntu-latest
environment: prod
steps:
- name: Approved
run: echo "Prod deployment approved - proceeding"
deploy-prod:
name: Deploy (prod)
needs: prod-approval
uses: ./.github/workflows/stage-4-deploy-env.yaml
with:
environment: prod
release_tag: ${{ github.ref_name }}
commit_sha: ${{ github.sha }}
branch_name: main
secrets: inherit