-
Notifications
You must be signed in to change notification settings - Fork 81
47 lines (40 loc) · 1.7 KB
/
test-gcs.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
name: root-signing GCS repository tests
on:
workflow_call:
workflow_dispatch:
schedule:
- cron: '17 4,10,16,22 * * *'
permissions: {}
jobs:
smoke-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set initial root for the smoke test
run: cp metadata/root_history/5.root.json ./root.json
- name: Smoke test Sigstore TUF repository with a TUF client
uses: theupdateframework/tuf-on-ci/actions/test-repository@27c49c016591c7cfea57f6b15296f714a5c4a5f6 # v0.13.0
with:
metadata_url: https://tuf-repo-cdn.sigstore.dev/
# when workflow is reused in publish.yml, do not require future validity
valid_days: ${{ github.event_name == 'workflow_call' && 0 || 3 }}
offline_valid_days: ${{ github.event_name == 'workflow_call' && 0 || 30 }}
custom-smoke-test:
permissions:
id-token: 'write' # For signing with the GitHub workflow identity
uses: ./.github/workflows/custom-test.yml
with:
metadata_url: https://tuf-repo-cdn.sigstore.dev/
update-issue:
runs-on: ubuntu-latest
needs: [smoke-test, custom-smoke-test]
# During workflow_call, caller updates issue
if: always() && !cancelled() && github.workflow == 'root-signing GCS repository tests'
permissions:
issues: 'write' # for modifying Issues
steps:
- name: Update the issue for the workflow
uses: theupdateframework/tuf-on-ci/actions/update-issue@27c49c016591c7cfea57f6b15296f714a5c4a5f6 # v0.13.0
with:
token: ${{ secrets.TUF_ON_CI_TOKEN || secrets.GITHUB_TOKEN }}
success: ${{ !contains(needs.*.result, 'failure') }}