4
4
- master
5
5
pull_request :
6
6
7
-
8
7
permissions :
9
8
contents : read
9
+ id-token : write
10
10
security-events : write # upload Sarif results
11
11
12
12
name : Build
17
17
- name : Checkout code
18
18
uses : actions/checkout@v4
19
19
20
+ - name : " Read secrets"
21
+ uses : rancher-eio/read-vault-secrets@main
22
+ with :
23
+ secrets : |
24
+ secret/data/github/repo/${{ github.repository }}/github/release-app-credentials appId | APP_ID ;
25
+ secret/data/github/repo/${{ github.repository }}/github/release-app-credentials privateKey | PRIVATE_KEY
26
+
27
+ - name : Create App Token
28
+ uses : actions/create-github-app-token@v1
29
+ id : app-token
30
+ with :
31
+ repositories : release-multus-cni
32
+ app-id : ${{ env.APP_ID }}
33
+ private-key : ${{ env.PRIVATE_KEY }}
34
+
20
35
- name : Set the TAG value
21
36
id : get-TAG
22
37
run : |
32
47
target : multus-thin
33
48
build-args : |
34
49
TAG=${{ env.TAG }}
50
+ SRC=x-access-token:${{ steps.app-token.outputs.token }}@github.com/rancher/release-multus-cni
35
51
36
52
- name : Build thick plugin image
37
53
uses : docker/build-push-action@v6
43
59
target : multus-thick
44
60
build-args : |
45
61
TAG=${{ env.TAG }}
62
+ SRC=x-access-token:${{ steps.app-token.outputs.token }}@github.com/rancher/release-multus-cni
46
63
47
64
- name : Run Trivy vulnerability scanner
48
65
uses :
aquasecurity/[email protected]
65
82
steps :
66
83
- name : Check out code
67
84
uses : actions/checkout@v4
85
+
86
+ - name : " Read secrets"
87
+ uses : rancher-eio/read-vault-secrets@main
88
+ with :
89
+ secrets : |
90
+ secret/data/github/repo/${{ github.repository }}/github/release-app-credentials appId | APP_ID ;
91
+ secret/data/github/repo/${{ github.repository }}/github/release-app-credentials privateKey | PRIVATE_KEY
92
+
93
+ - name : Create App Token
94
+ uses : actions/create-github-app-token@v1
95
+ id : app-token
96
+ with :
97
+ repositories : release-multus-cni
98
+ app-id : ${{ env.APP_ID }}
99
+ private-key : ${{ env.PRIVATE_KEY }}
68
100
69
101
- name : Set up QEMU
70
102
uses : docker/setup-qemu-action@v3
76
108
id : get-TAG
77
109
run : |
78
110
echo "$(make -s log | grep TAG)" >> "$GITHUB_ENV"
111
+
79
112
- name : Build container image
80
113
uses : docker/build-push-action@v6
81
114
with :
88
121
platforms : linux/arm64
89
122
build-args : |
90
123
TAG=${{ env.TAG }}
124
+ SRC=x-access-token:${{ steps.app-token.outputs.token }}@github.com/rancher/release-multus-cni
91
125
92
126
- name : Build thick plugin image
93
127
uses : docker/build-push-action@v6
@@ -101,3 +135,4 @@ jobs:
101
135
platforms : linux/arm64
102
136
build-args : |
103
137
TAG=${{ env.TAG }}
138
+ SRC=x-access-token:${{ steps.app-token.outputs.token }}@github.com/rancher/release-multus-cni
0 commit comments