File tree 3 files changed +33
-10
lines changed
3 files changed +33
-10
lines changed Original file line number Diff line number Diff line change 3
3
name : Build and sign image
4
4
5
5
on :
6
- pull_request :
7
- types :
8
- - closed
9
- branches :
10
- - " main"
11
-
6
+ push :
7
+ tags :
8
+ - " v[0-9]+.[0-9]+.[0-9]+"
12
9
env :
13
10
REGISTRY : ghcr.io
14
11
IMAGE_NAME : ${{ github.repository }}
15
12
16
13
jobs :
17
14
build_and_sign_image :
18
- if : ${{ github.event.pull_request.merged }}
19
15
runs-on : ubuntu-latest
20
16
permissions :
21
- contents : read
17
+ contents : write
22
18
packages : write
23
19
id-token : write
24
20
security-events : write
27
23
- name : Checkout
28
24
uses : actions/checkout@v4
29
25
26
+ - uses : anchore/sbom-action@v0
27
+ with :
28
+ image : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
29
+ output-file : ./nginx-loadbalancer-kubernetes-${{env.GITHUB_REF_NAME}}.spdx.json
30
+ registry-username : ${{ github.actor }}
31
+ registry-password : ${{ secrets.GITHUB_TOKEN }}
32
+
30
33
- name : Install cosign
31
34
uses : sigstore/cosign-installer@9614fae9e5c5eddabb09f90a270fcb487c9f7149 # v3.0.2
32
35
with :
79
82
sarif_file : ' trivy-results-${{ inputs.image }}.sarif'
80
83
sha : ${{ github.sha }}
81
84
ref : ${{ github.ref }}
85
+
86
+ - name : Generate Release
87
+ uses : ncipollo/release-action@v1
88
+ with :
89
+ artifacts : |
90
+ trivy-results-${{ inputs.image }}.sarif
91
+ ./nginx-loadbalancer-kubernetes-${{env.GITHUB_REF_NAME}}.spdx.json
92
+ body : |
93
+ # Release ${{env.GITHUB_REF_NAME}}
94
+ ## Changelog
95
+ ${{ steps.meta.outputs.changelog }}
96
+ generateReleaseNotes : true
97
+ makeLatest : false
98
+ name : " ${{env.GITHUB_REF_NAME}}"
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
# This workflow will build a golang project
2
2
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3
3
4
- name : CI
4
+ name : Run tests
5
5
6
6
on :
7
+ branch_protection_rule :
8
+ types :
9
+ - created
10
+
7
11
push :
8
- branches : [ "main", "*" ]
12
+ branches :
13
+ - main
14
+ - *
9
15
10
16
jobs :
11
17
You can’t perform that action at this time.
0 commit comments