22#
33# devctl
44#
5- # https://github.com/giantswarm/devctl/blob/da653ffe50bb61d247594e9b842bb36fdac7bb18 /pkg/gen/input/workflows/internal/file/create_release.yaml.template
5+ # https://github.com/giantswarm/devctl/blob/72df19d0bff1cc8a679b00fdb4ac4e2504f8962a /pkg/gen/input/workflows/internal/file/create_release.yaml.template
66#
77name: Create Release
88on:
1414 - 'release-v*.*.x'
1515 # "!" negates previous positive patterns so it has to be at the end.
1616 - '!release-v*.x.x'
17+
18+ permissions: {}
19+
1720jobs:
1821 debug_info:
1922 name: Debug info
2730 gather_facts:
2831 name: Gather facts
2932 runs-on: ubuntu-22.04
33+ permissions:
34+ contents: read
3035 outputs:
3136 project_go_path: ${{ steps.get_project_go_path.outputs.path }}
3237 ref_version: ${{ steps.ref_version.outputs.refversion }}
5459 echo "version=${version}" >> $GITHUB_OUTPUT
5560 - name: Checkout code
5661 if: ${{ steps.get_version.outputs.version != '' }}
57- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
62+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5863 - name: Get project.go path
5964 id: get_project_go_path
6065 if: ${{ steps.get_version.outputs.version != '' }}
8590 update_project_go:
8691 name: Update project.go
8792 runs-on: ubuntu-22.04
93+ permissions:
94+ contents: read
8895 if: ${{ needs.gather_facts.outputs.version != '' && needs.gather_facts.outputs.project_go_path != '' && needs.gather_facts.outputs.ref_version != 'true' }}
8996 needs:
9097 - gather_facts
@@ -103,7 +110,9 @@ jobs:
103110 tarball_binary_path: "*/src/${binary}"
104111 smoke_test: "${binary} --version"
105112 - name: Checkout code
106- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
113+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
114+ with:
115+ persist-credentials: false
107116 - name: Update project.go
108117 id: update_project_go
109118 env:
@@ -156,16 +165,19 @@ jobs:
156165 create_release:
157166 name: Create release
158167 runs-on: ubuntu-22.04
168+ permissions:
169+ contents: read
159170 needs:
160171 - gather_facts
161172 if: ${{ needs.gather_facts.outputs.version }}
162173 outputs:
163174 upload_url: ${{ steps.create_gh_release.outputs.upload_url }}
164175 steps:
165176 - name: Checkout code
166- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
177+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
167178 with:
168179 ref: ${{ github.sha }}
180+ persist-credentials: false
169181 - name: Ensure correct version in project.go
170182 if: ${{ needs.gather_facts.outputs.project_go_path != '' && needs.gather_facts.outputs.ref_version != 'true' }}
171183 run: |
@@ -194,16 +206,17 @@ jobs:
194206 - name: Create release
195207 id: create_gh_release
196208 uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
197- env:
198- GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}"
199209 with:
200210 body: ${{ steps.changelog_reader.outputs.changes }}
201211 tag: "v${{ needs.gather_facts.outputs.version }}"
212+ token: ${{ secrets.TAYLORBOT_GITHUB_ACTION }}
202213 skipIfReleaseExists: true
203214
204215 create-release-branch:
205216 name: Create release branch
206217 runs-on: ubuntu-22.04
218+ permissions:
219+ contents: write
207220 needs:
208221 - gather_facts
209222 if: ${{ needs.gather_facts.outputs.version }}
@@ -217,7 +230,7 @@ jobs:
217230 tarball_binary_path: "*/src/${binary}"
218231 smoke_test: "${binary} --version"
219232 - name: Check out the repository
220- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
233+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
221234 with:
222235 fetch-depth: 0 # Clone the whole history, not just the most recent commit.
223236 - name: Fetch all tags and branches
0 commit comments