|
2 | 2 | # |
3 | 3 | # devctl |
4 | 4 | # |
5 | | -# https://github.com/giantswarm/devctl/blob/063b90515fe92a8350c734f2caea0343ae3aca64/pkg/gen/input/workflows/internal/file/create_release.yaml.template |
| 5 | +# https://github.com/giantswarm/devctl/blob/1acd23e6a78c21ca61ccbe8a7e5a8a3139feeab5/pkg/gen/input/workflows/internal/file/create_release.yaml.template |
6 | 6 | # |
7 | 7 | name: Create Release |
8 | 8 | on: |
|
14 | 14 | - 'release-v*.*.x' |
15 | 15 | # "!" negates previous positive patterns so it has to be at the end. |
16 | 16 | - '!release-v*.x.x' |
| 17 | + |
| 18 | +permissions: {} |
| 19 | + |
17 | 20 | jobs: |
18 | 21 | debug_info: |
19 | 22 | name: Debug info |
|
27 | 30 | gather_facts: |
28 | 31 | name: Gather facts |
29 | 32 | runs-on: ubuntu-22.04 |
| 33 | + permissions: |
| 34 | + contents: read |
30 | 35 | outputs: |
31 | 36 | project_go_path: ${{ steps.get_project_go_path.outputs.path }} |
32 | 37 | ref_version: ${{ steps.ref_version.outputs.refversion }} |
|
54 | 59 | echo "version=${version}" >> $GITHUB_OUTPUT |
55 | 60 | - name: Checkout code |
56 | 61 | if: ${{ steps.get_version.outputs.version != '' }} |
57 | | - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 62 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
58 | 63 | - name: Get project.go path |
59 | 64 | id: get_project_go_path |
60 | 65 | if: ${{ steps.get_version.outputs.version != '' }} |
@@ -85,25 +90,27 @@ jobs: |
85 | 90 | update_project_go: |
86 | 91 | name: Update project.go |
87 | 92 | runs-on: ubuntu-22.04 |
| 93 | + permissions: |
| 94 | + contents: read |
88 | 95 | if: ${{ needs.gather_facts.outputs.version != '' && needs.gather_facts.outputs.project_go_path != '' && needs.gather_facts.outputs.ref_version != 'true' }} |
89 | 96 | needs: |
90 | 97 | - gather_facts |
91 | 98 | steps: |
92 | 99 | - name: Install architect |
93 | | - uses: giantswarm/install-binary-action@0797deb878056114fa54ee30c519f617716e8c69 # v3.1.1 |
| 100 | + uses: giantswarm/install-binary-action@c94c7adadeb14af4bdbdd601f9a6e7f69638134c # v4.0.0 |
94 | 101 | with: |
95 | 102 | binary: "architect" |
96 | 103 | version: "6.14.1" |
97 | 104 | - name: Install semver |
98 | | - uses: giantswarm/install-binary-action@0797deb878056114fa54ee30c519f617716e8c69 # v3.1.1 |
| 105 | + uses: giantswarm/install-binary-action@c94c7adadeb14af4bdbdd601f9a6e7f69638134c # v4.0.0 |
99 | 106 | with: |
100 | 107 | binary: "semver" |
101 | 108 | version: "3.2.0" |
102 | 109 | download_url: "https://github.com/fsaintjacques/${binary}-tool/archive/${version}.tar.gz" |
103 | 110 | tarball_binary_path: "*/src/${binary}" |
104 | 111 | smoke_test: "${binary} --version" |
105 | 112 | - name: Checkout code |
106 | | - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 113 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
107 | 114 | - name: Update project.go |
108 | 115 | id: update_project_go |
109 | 116 | env: |
@@ -156,14 +163,16 @@ jobs: |
156 | 163 | create_release: |
157 | 164 | name: Create release |
158 | 165 | runs-on: ubuntu-22.04 |
| 166 | + permissions: |
| 167 | + contents: read |
159 | 168 | needs: |
160 | 169 | - gather_facts |
161 | 170 | if: ${{ needs.gather_facts.outputs.version }} |
162 | 171 | outputs: |
163 | 172 | upload_url: ${{ steps.create_gh_release.outputs.upload_url }} |
164 | 173 | steps: |
165 | 174 | - name: Checkout code |
166 | | - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 175 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
167 | 176 | with: |
168 | 177 | ref: ${{ github.sha }} |
169 | 178 | - name: Ensure correct version in project.go |
@@ -204,20 +213,22 @@ jobs: |
204 | 213 | create-release-branch: |
205 | 214 | name: Create release branch |
206 | 215 | runs-on: ubuntu-22.04 |
| 216 | + permissions: |
| 217 | + contents: write |
207 | 218 | needs: |
208 | 219 | - gather_facts |
209 | 220 | if: ${{ needs.gather_facts.outputs.version }} |
210 | 221 | steps: |
211 | 222 | - name: Install semver |
212 | | - uses: giantswarm/install-binary-action@0797deb878056114fa54ee30c519f617716e8c69 # v3.1.1 |
| 223 | + uses: giantswarm/install-binary-action@c94c7adadeb14af4bdbdd601f9a6e7f69638134c # v4.0.0 |
213 | 224 | with: |
214 | 225 | binary: "semver" |
215 | 226 | version: "3.0.0" |
216 | 227 | download_url: "https://github.com/fsaintjacques/${binary}-tool/archive/${version}.tar.gz" |
217 | 228 | tarball_binary_path: "*/src/${binary}" |
218 | 229 | smoke_test: "${binary} --version" |
219 | 230 | - name: Check out the repository |
220 | | - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 231 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
221 | 232 | with: |
222 | 233 | fetch-depth: 0 # Clone the whole history, not just the most recent commit. |
223 | 234 | - name: Fetch all tags and branches |
|
0 commit comments