7
7
- ' main'
8
8
9
9
jobs :
10
- test_cosign_action :
10
+ get_all_cosign_releases :
11
+ runs-on : ubuntu-latest
12
+ permissions : {}
13
+ name : Fetch current list of all Cosign releases for testing
14
+ outputs :
15
+ releases : ${{ steps.get_tags.outputs.result }}
16
+ steps :
17
+ - name : Get release tags
18
+ id : get_tags
19
+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
20
+ with :
21
+ retries : 3
22
+ script : |
23
+ const response = await github.rest.repos.listReleases({owner:'sigstore',repo:'cosign'});
24
+ const releases = response.data.map(release => release.tag_name);
25
+ console.log("Found releases: " + releases);
26
+ // omits 0.5.0 and 0.6.0 releases because they are tested separately
27
+ return releases.filter(rel => !['0.5.0', '0.6.0'].includes(rel));
28
+ env :
29
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30
+
31
+ test_default_version_cosign_action :
11
32
runs-on : ${{ matrix.os }}
12
33
strategy :
13
34
matrix :
14
35
os : [macos-latest, ubuntu-latest, windows-latest]
15
36
permissions : {}
16
- name : Install Cosign and test presence in path
37
+ name : Install default version Cosign and test presence in path
17
38
steps :
18
39
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
40
+ with :
41
+ persist-credentials : false
19
42
- name : Install Cosign
20
43
uses : ./
21
44
- name : Check install!
40
63
name : Install existing release of Cosign and test presence in path
41
64
steps :
42
65
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
66
+ with :
67
+ persist-credentials : false
43
68
- name : Install Cosign
44
69
uses : sigstore/cosign-installer@dd6b2e2b610a11fd73dd187a43d57cc1394e35f9 # v3.0.5
45
70
- name : Check install!
@@ -55,17 +80,21 @@ jobs:
55
80
56
81
test_cosign_action_custom :
57
82
runs-on : ${{ matrix.os }}
83
+ needs : get_all_cosign_releases
58
84
strategy :
59
85
matrix :
60
86
os : [macos-latest, ubuntu-latest, windows-latest]
87
+ cosign_release : ${{ fromJson(needs.get_all_cosign_releases.outputs.releases) }}
61
88
permissions : {}
62
- name : Install Custom Cosign and test presence in path
89
+ name : Install Cosign ${{ matrix.cosign_release }} on ${{ matrix.os }} and test presence in path
63
90
steps :
64
91
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
92
+ with :
93
+ persist-credentials : false
65
94
- name : Install Cosign
66
95
uses : ./
67
96
with :
68
- cosign-release : ' v2.2.3 '
97
+ cosign-release : ${{ matrix.cosign_release }}
69
98
- name : Check install!
70
99
run : cosign version
71
100
- name : Check root directory
87
116
name : Install Cosign v0.5.0 and test presence in path
88
117
steps :
89
118
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
119
+ with :
120
+ persist-credentials : false
90
121
- name : Install Cosign
91
122
uses : ./
92
123
with :
@@ -112,6 +143,8 @@ jobs:
112
143
name : Install Cosign v0.6.0 and test presence in path
113
144
steps :
114
145
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
146
+ with :
147
+ persist-credentials : false
115
148
- name : Install Cosign
116
149
uses : ./
117
150
with :
@@ -138,6 +171,8 @@ jobs:
138
171
name : Install Cosign v0.6.0 and test presence in path with pre installed libpcsclite1 package
139
172
steps :
140
173
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
174
+ with :
175
+ persist-credentials : false
141
176
- name : Install libpcsclite1
142
177
run : |
143
178
sudo apt-get update -q
@@ -166,6 +201,8 @@ jobs:
166
201
name : Try to install a wrong Cosign
167
202
steps :
168
203
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
204
+ with :
205
+ persist-credentials : false
169
206
- name : Install Cosign
170
207
uses : ./
171
208
with :
@@ -181,6 +218,8 @@ jobs:
181
218
name : Install Custom Cosign and test presence in path
182
219
steps :
183
220
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
221
+ with :
222
+ persist-credentials : false
184
223
- name : Install Cosign
185
224
uses : ./
186
225
with :
@@ -205,6 +244,8 @@ jobs:
205
244
name : Install Custom Cosign and test presence in path with custom root dir
206
245
steps :
207
246
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
247
+ with :
248
+ persist-credentials : false
208
249
- name : Install Cosign
209
250
uses : ./
210
251
with :
@@ -231,11 +272,13 @@ jobs:
231
272
- ubuntu-latest
232
273
- windows-latest
233
274
go_version :
234
- - ' 1.21'
235
275
- ' 1.22'
236
- name : Try to install cosign with go ${{ matrix.go_version }}
276
+ - ' 1.23'
277
+ name : Try to install cosign with go ${{ matrix.go_version }} on ${{ matrix.os }}
237
278
steps :
238
279
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
280
+ with :
281
+ persist-credentials : false
239
282
- uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
240
283
with :
241
284
go-version : ${{ matrix.go_version }}
0 commit comments