Commit 8a3409d 1 parent c6c4ace commit 8a3409d Copy full SHA for 8a3409d
File tree 3 files changed +56
-10
lines changed
3 files changed +56
-10
lines changed Original file line number Diff line number Diff line change 1
1
name : End-to-end tests
2
2
on :
3
- push :
4
- tags :
5
- - " v*"
3
+ workflow_call :
4
+ inputs :
5
+ clientId :
6
+ description : Client ID to use for authentication
7
+ required : true
8
+ type : string
9
+ oktaOrgUrl :
10
+ description : Okta organization URL
11
+ required : false
12
+ type : string
13
+ oktaAuthServer :
14
+ description : Okta authentication server identifier
15
+ required : false
16
+ type : string
17
+ ref :
18
+ description : Reference branch, tag or commit SHA to checkout
19
+ required : false
20
+ type : string
21
+ default : main
22
+ secrets :
23
+ clientSecret :
24
+ description : Client secret to use for authentication
25
+ required : true
6
26
jobs :
7
27
test :
8
28
name : Run e2e tests
9
29
runs-on : ubuntu-latest
10
30
steps :
11
31
- name : Check out code
12
32
uses : actions/checkout@v4
33
+ with :
34
+ repository : nobl9/sloctl
35
+ ref : ${{ inputs.ref }}
13
36
- uses : actions/setup-go@v5
14
37
with :
15
38
go-version-file : go.mod
16
39
cache : false
17
40
- name : Run tests
18
- run : make test/e2e
19
41
env :
20
- SLOCTL_CLIENT_ID : ${{ vars.SLOCTL_CLIENT_ID }}
21
- SLOCTL_CLIENT_SECRET : ${{ secrets.SLOCTL_CLIENT_SECRET }}
42
+ SLOCTL_CLIENT_ID : ${{ inputs.clientId }}
43
+ SLOCTL_CLIENT_SECRET : ${{ secrets.clientSecret }}
44
+ SLOCTL_OKTA_ORG_URL : " ${{ inputs.oktaOrgUrl }}"
45
+ SLOCTL_OKTA_AUTH_SERVER : " ${{ inputs.oktaAuthServer }}"
46
+ run : make test/e2e
Original file line number Diff line number Diff line change @@ -2,15 +2,20 @@ name: Release candidate
2
2
on :
3
3
push :
4
4
tags :
5
- - " v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ "
5
+ - " v[0-9]+.[0-9]+.[0-9]+-* "
6
6
jobs :
7
+ test :
8
+ uses : ./.github/workflows/e2e-tests.yml
9
+ with :
10
+ clientId : " ${{ vars.SLOCTL_CLIENT_ID }}"
11
+ ref : " ${{ github.ref_name }}"
12
+ secrets :
13
+ clientSecret : " ${{ secrets.SLOCTL_CLIENT_SECRET }}"
7
14
release :
8
15
runs-on : ubuntu-latest
9
16
steps :
10
17
- name : Checkout Source
11
18
uses : actions/checkout@v4
12
- with :
13
- fetch-depth : 0
14
19
- name : Set up Go
15
20
uses : actions/setup-go@v5
16
21
with :
23
28
args : release --clean --skip=homebrew
24
29
env :
25
30
GITHUB_TOKEN : ${{ secrets.GORELEASER_TOKEN }}
31
+ GORELEASER_CURRENT_TAG : ${{ github.ref_name }}
Original file line number Diff line number Diff line change 4
4
tags :
5
5
- " v[0-9]+.[0-9]+.[0-9]+"
6
6
jobs :
7
+ test :
8
+ uses : ./.github/workflows/e2e-tests.yml
9
+ with :
10
+ clientId : " ${{ vars.SLOCTL_CLIENT_ID }}"
11
+ ref : " ${{ github.ref_name }}"
12
+ secrets :
13
+ clientSecret : " ${{ secrets.SLOCTL_CLIENT_SECRET }}"
14
+ qa :
15
+ runs-on : ubuntu-latest
16
+ environment : qa-approval
17
+ steps :
18
+ - name : No-op approval
19
+ run : echo "This is a no-op step, QA needs to approve it and may perform testing beforehand"
7
20
release :
8
21
runs-on : ubuntu-latest
9
- environment : release
22
+ needs : [test, qa]
23
+ environment : management-approval
10
24
steps :
11
25
- name : Checkout Source
12
26
uses : actions/checkout@v4
43
57
args : release --clean
44
58
env :
45
59
GITHUB_TOKEN : ${{ secrets.GORELEASER_TOKEN }}
60
+ GORELEASER_CURRENT_TAG : ${{ github.ref_name }}
46
61
- name : Build and push
47
62
id : docker_build
48
63
uses : docker/build-push-action@v5
You can’t perform that action at this time.
0 commit comments