@@ -27,6 +27,9 @@ concurrency:
27
27
env :
28
28
platforms : " linux/arm64, linux/amd64"
29
29
30
+ permissions :
31
+ contents : read
32
+
30
33
jobs :
31
34
vars :
32
35
name : Checks and variables
@@ -89,14 +92,22 @@ jobs:
89
92
node-version : 18
90
93
- run : npm --prefix ${{ github.workspace }}/internal/mode/static/nginx/modules install-ci-test
91
94
92
- release :
93
- name : Release
95
+ binary :
96
+ name : Build Binary
94
97
runs-on : ubuntu-22.04
95
- needs : [unit-tests, njs-unit-tests]
96
- if : ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }}
98
+ needs : [vars, unit-tests, njs-unit-tests]
99
+ permissions :
100
+ contents : write # for goreleaser/goreleaser-action and lucacome/draft-release to create/update releases
97
101
steps :
98
102
- name : Checkout Repository
99
103
uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
104
+ with :
105
+ fetch-depth : 0
106
+
107
+ - name : Setup Golang Environment
108
+ uses : actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
109
+ with :
110
+ go-version-file : go.mod
100
111
101
112
- name : Create/Update Draft
102
113
uses : lucacome/draft-release@f6dc37dcdf44be100a649b72c62c628776750190 # v0.2.2
@@ -108,21 +119,7 @@ jobs:
108
119
notes-header : |
109
120
*Below is the auto-generated changelog, which includes all PRs that went into the release.
110
121
For a shorter version that highlights only important changes, see [CHANGELOG.md](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/{{version}}/CHANGELOG.md).*
111
-
112
- binary :
113
- name : Build Binary
114
- runs-on : ubuntu-22.04
115
- needs : vars
116
- steps :
117
- - name : Checkout Repository
118
- uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
119
- with :
120
- fetch-depth : 0
121
-
122
- - name : Setup Golang Environment
123
- uses : actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
124
- with :
125
- go-version-file : go.mod
122
+ if : ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }}
126
123
127
124
- name : Download Syft
128
125
uses : anchore/sbom-action/download-syft@78fc58e266e87a38d4194b2137a3d4e9bcaf7ca1 # v0.14.3
@@ -151,6 +148,10 @@ jobs:
151
148
name : Build Image
152
149
runs-on : ubuntu-22.04
153
150
needs : [vars, binary]
151
+ permissions :
152
+ contents : read # for docker/build-push-action to read repo content
153
+ security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
154
+ packages : write # for docker/build-push-action to push to GHCR
154
155
steps :
155
156
- name : Checkout Repository
156
157
uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
0 commit comments