This repository has been archived by the owner on Mar 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 99
145 lines (123 loc) · 3.88 KB
/
release.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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# This pipeline builds the sfpowerscripts & sfp cli plugin
# Needs following secrets
# NPM_TOKEN : Token to npm.js for dx@scale scope
# DOCKER_USERNAME : Token to username for ghcr.io for publishing docker
# DOCKER_SECRET: Password/Token for ghcr.io for publishing docker
#
# Needs the following env vars
# The repo name (for docker registry) has to be set in each job due to a limitiation with github actions
# as global vars (non secrets) cant be passed down to other jobs
name: 'Release'
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'
- 'decision records/**'
- 'demoreel/**'
- 'prerequisites/**'
workflow_dispatch:
run-name: Release ${{ github.run_id }} / ${{ github.ref_name }}
# Merge to Develop, create builds
jobs:
build:
name: 'build packages'
uses: ./.github/workflows/buildPackages.yml
with:
version: ${{ github.ref }}
publish: true
environment: build
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
# On successfull creation of packages,(or even if lerna skips), create docker image
build-docker:
name: 'build docker image'
uses: ./.github/workflows/sfpowerscripts-build-docker.yml
with:
job-environment: 'build-docker'
suffix-tag: ${{ github.run_id }}
repo: 'dxatscale'
image: 'sfpowerscripts-rc'
secrets:
username: ${{ secrets.DOCKER_USERNAME }}
token: ${{ secrets.DOCKER_SECRET }}
needs: [ build ]
#Promotion Stages
# Sfpowercripts
sfpowerscripts-alpha:
name: 'sfpowerscripts alpha'
uses: ./.github/workflows/promotePackage.yml
with:
version: 'alpha'
pathToPackageJson: 'packages/sfpowerscripts-cli/package.json'
environment: sfpowerscripts-alpha
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
needs: [ build ]
alpha-docker:
name: 'promote docker to alpha'
uses: ./.github/workflows/sfpowerscripts-promote-docker.yml
with:
job-environment: 'sfpowerscripts-alpha-docker'
repo: 'dxatscale'
new-tag: alpha
image: 'sfpowerscripts-rc'
secrets:
username: ${{ secrets.DOCKER_USERNAME }}
token: ${{ secrets.DOCKER_SECRET }}
needs: [ build-docker ]
sfpowerscripts-beta:
name: 'sfpowerscripts beta'
uses: ./.github/workflows/promotePackage.yml
with:
version: 'beta'
pathToPackageJson: 'packages/sfpowerscripts-cli/package.json'
environment: sfpowerscripts-beta
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
needs: [ build ]
beta-docker:
name: 'promote docker to beta'
uses: ./.github/workflows/sfpowerscripts-promote-docker.yml
with:
job-environment: 'sfpowerscripts-beta-docker'
repo: 'dxatscale'
new-tag: beta
image: 'sfpowerscripts-rc'
secrets:
username: ${{ secrets.DOCKER_USERNAME }}
token: ${{ secrets.DOCKER_SECRET }}
needs: [ build-docker ]
sfpowerscripts-prod:
name: 'sfpowerscripts prod'
uses: ./.github/workflows/promotePackage.yml
with:
version: 'latest'
pathToPackageJson: 'packages/sfpowerscripts-cli/package.json'
environment: sfpowerscripts-prod
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
needs: [ build ]
sfp-prod:
name: 'sfp prod'
uses: ./.github/workflows/promotePackage.yml
with:
version: 'latest'
pathToPackageJson: 'packages/sfp-cli/package.json'
environment: sfp-prod
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
needs: [ build ]
prod-docker:
name: 'copy rc docker to prod'
uses: ./.github/workflows/sfpowerscripts-copy-docker.yml
with:
job-environment: 'sfpowerscripts-prod-docker'
secrets:
username: ${{ secrets.DOCKER_USERNAME }}
token: ${{ secrets.DOCKER_SECRET }}
signing_secret: ${{ secrets.SIGNING_SECRET }}
cosign_password: ${{ secrets.COSIGN_PASSWORD }}
needs: [ build-docker ]