-
Notifications
You must be signed in to change notification settings - Fork 81
86 lines (76 loc) · 2.82 KB
/
release-please.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
name: Run Release Please
on:
push:
branches:
- v8
jobs:
go-versions:
uses: ./.github/workflows/go-versions.yml
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{secrets.GITHUB_TOKEN}}
release-relay:
permissions:
id-token: write # Needed to obtain Docker tokens
contents: write # Needed to upload release artifacts
outputs:
hashes: ${{ steps.publish.outputs.hashes }}
images_and_digests: ${{ steps.publish.outputs.images_and_digests }}
needs: [ release-please, go-versions ]
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: launchdarkly/gh-actions/actions/[email protected]
name: 'Get Docker token'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/global/services/docker/public/username = DOCKER_USERNAME, /global/services/docker/public/token = DOCKER_TOKEN'
- name: Setup Go ${{ needs.go-versions.outputs.latest }}
uses: actions/setup-go@v5
with:
go-version: ${{ needs.go-versions.outputs.latest }}
- uses: ./.github/actions/unit-tests
- uses: ./.github/actions/publish
id: publish
with:
dry-run: 'false'
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.release-please.outputs.tag_name }}
release-relay-binary-provenance:
needs: ['release-please', 'release-relay']
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
base64-subjects: "${{ needs.release-relay.outputs.hashes }}"
upload-assets: true
upload-tag-name: ${{ needs.release-please.outputs.tag_name }}
provenance-name: ${{ format('ld-relay-{0}_multiple_provenance.intoto.jsonl', needs.release-please.outputs.tag_name) }}
release-relay-image-provenance:
needs: ['release-please', 'release-relay']
permissions:
actions: read
id-token: write
packages: write
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
strategy:
matrix:
images_and_digests: ${{fromJson(needs.release-relay.outputs.images_and_digests)}}
with:
image: ${{ matrix.images_and_digests.image }}
digest: ${{ matrix.images_and_digests.digest }}
registry-username: ${{ vars.DOCKER_USERNAME }}
secrets:
registry-password: ${{ secrets.DOCKER_TOKEN }}