@@ -3,8 +3,8 @@ name: Runner CD
33on :
44 workflow_dispatch :
55 push :
6- paths :
7- - releaseVersion
6+ branches :
7+ - releases/v*
88
99jobs :
1010 check :
@@ -46,44 +46,19 @@ jobs:
4646 needs : check
4747 outputs :
4848 linux-x64-sha : ${{ steps.sha.outputs.linux-x64-sha256 }}
49- linux-arm64-sha : ${{ steps.sha.outputs.linux-arm64-sha256 }}
50- linux-arm-sha : ${{ steps.sha.outputs.linux-arm-sha256 }}
51- win-x64-sha : ${{ steps.sha.outputs.win-x64-sha256 }}
52- win-arm64-sha : ${{ steps.sha.outputs.win-arm64-sha256 }}
53- osx-x64-sha : ${{ steps.sha.outputs.osx-x64-sha256 }}
5449 osx-arm64-sha : ${{ steps.sha.outputs.osx-arm64-sha256 }}
5550 strategy :
5651 matrix :
57- runtime : [ linux-x64, linux-arm64, linux-arm, win-x64, osx-x64, osx-arm64, win -arm64 ]
52+ runtime : [ linux-x64, osx-arm64 ]
5853 include :
5954 - runtime : linux-x64
6055 os : ubuntu-latest
6156 devScript : ./dev.sh
6257
63- - runtime : linux-arm64
64- os : ubuntu-latest
65- devScript : ./dev.sh
66-
67- - runtime : linux-arm
68- os : ubuntu-latest
69- devScript : ./dev.sh
70-
71- - runtime : osx-x64
72- os : macOS-latest
73- devScript : ./dev.sh
74-
7558 - runtime : osx-arm64
7659 os : macOS-latest
7760 devScript : ./dev.sh
7861
79- - runtime : win-x64
80- os : windows-latest
81- devScript : ./dev
82-
83- - runtime : win-arm64
84- os : windows-latest
85- devScript : ./dev
86-
8762 runs-on : ${{ matrix.os }}
8863 steps :
8964 - uses : actions/checkout@v6
@@ -132,40 +107,15 @@ jobs:
132107 - uses : actions/checkout@v6
133108
134109 # Download runner package tar.gz/zip produced by 'build' job
135- - name : Download Artifact (win-x64)
136- uses : actions/download-artifact@v7
137- with :
138- name : runner-packages-win-x64
139- path : ./
140- - name : Download Artifact (win-arm64)
141- uses : actions/download-artifact@v7
142- with :
143- name : runner-packages-win-arm64
144- path : ./
145- - name : Download Artifact (osx-x64)
146- uses : actions/download-artifact@v7
147- with :
148- name : runner-packages-osx-x64
149- path : ./
150- - name : Download Artifact (osx-arm64)
151- uses : actions/download-artifact@v7
152- with :
153- name : runner-packages-osx-arm64
154- path : ./
155110 - name : Download Artifact (linux-x64)
156111 uses : actions/download-artifact@v7
157112 with :
158113 name : runner-packages-linux-x64
159114 path : ./
160- - name : Download Artifact (linux-arm)
161- uses : actions/download-artifact@v7
162- with :
163- name : runner-packages-linux-arm
164- path : ./
165- - name : Download Artifact (linux-arm64)
115+ - name : Download Artifact (osx-arm64)
166116 uses : actions/download-artifact@v7
167117 with :
168- name : runner-packages-linux -arm64
118+ name : runner-packages-osx -arm64
169119 path : ./
170120
171121 # Create ReleaseNote file
@@ -178,27 +128,17 @@ jobs:
178128 const fs = require('fs');
179129 const runnerVersion = fs.readFileSync('${{ github.workspace }}/src/runnerversion', 'utf8').replace(/\n$/g, '')
180130 var releaseNote = fs.readFileSync('${{ github.workspace }}/releaseNote.md', 'utf8').replace(/<RUNNER_VERSION>/g, runnerVersion)
181- releaseNote = releaseNote.replace(/<WIN_X64_SHA>/g, '${{needs.build.outputs.win-x64-sha}}')
182- releaseNote = releaseNote.replace(/<WIN_ARM64_SHA>/g, '${{needs.build.outputs.win-arm64-sha}}')
183- releaseNote = releaseNote.replace(/<OSX_X64_SHA>/g, '${{needs.build.outputs.osx-x64-sha}}')
184131 releaseNote = releaseNote.replace(/<OSX_ARM64_SHA>/g, '${{needs.build.outputs.osx-arm64-sha}}')
185132 releaseNote = releaseNote.replace(/<LINUX_X64_SHA>/g, '${{needs.build.outputs.linux-x64-sha}}')
186- releaseNote = releaseNote.replace(/<LINUX_ARM_SHA>/g, '${{needs.build.outputs.linux-arm-sha}}')
187- releaseNote = releaseNote.replace(/<LINUX_ARM64_SHA>/g, '${{needs.build.outputs.linux-arm64-sha}}')
188133 console.log(releaseNote)
189134 core.setOutput('version', runnerVersion);
190135 core.setOutput('note', releaseNote);
191136
192137 - name : Validate Packages HASH
193138 run : |
194139 ls -l
195- echo "${{needs.build.outputs.win-x64-sha}} actions-runner-win-x64-${{ steps.releaseNote.outputs.version }}.zip" | shasum -a 256 -c
196- echo "${{needs.build.outputs.win-arm64-sha}} actions-runner-win-arm64-${{ steps.releaseNote.outputs.version }}.zip" | shasum -a 256 -c
197- echo "${{needs.build.outputs.osx-x64-sha}} actions-runner-osx-x64-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c
198- echo "${{needs.build.outputs.osx-arm64-sha}} actions-runner-osx-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c
199140 echo "${{needs.build.outputs.linux-x64-sha}} actions-runner-linux-x64-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c
200- echo "${{needs.build.outputs.linux-arm-sha}} actions-runner-linux-arm-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c
201- echo "${{needs.build.outputs.linux-arm64-sha}} actions-runner-linux-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c
141+ echo "${{needs.build.outputs.osx-arm64-sha}} actions-runner-osx-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz" | shasum -a 256 -c
202142
203143 # Create GitHub release
204144 - uses : actions/create-release@master
@@ -207,32 +147,12 @@ jobs:
207147 env :
208148 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
209149 with :
210- tag_name : " v${{ steps.releaseNote.outputs.version }}"
150+ tag_name : " v${{ steps.releaseNote.outputs.version }}-bitrise "
211151 release_name : " v${{ steps.releaseNote.outputs.version }}"
212152 body : |
213153 ${{ steps.releaseNote.outputs.note }}
214154
215155 # Upload release assets (full runner packages)
216- - name : Upload Release Asset (win-x64)
217- uses : actions/upload-release-asset@v1.0.2
218- env :
219- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
220- with :
221- upload_url : ${{ steps.createRelease.outputs.upload_url }}
222- asset_path : ${{ github.workspace }}/actions-runner-win-x64-${{ steps.releaseNote.outputs.version }}.zip
223- asset_name : actions-runner-win-x64-${{ steps.releaseNote.outputs.version }}.zip
224- asset_content_type : application/octet-stream
225-
226- - name : Upload Release Asset (win-arm64)
227- uses : actions/upload-release-asset@v1.0.2
228- env :
229- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
230- with :
231- upload_url : ${{ steps.createRelease.outputs.upload_url }}
232- asset_path : ${{ github.workspace }}/actions-runner-win-arm64-${{ steps.releaseNote.outputs.version }}.zip
233- asset_name : actions-runner-win-arm64-${{ steps.releaseNote.outputs.version }}.zip
234- asset_content_type : application/octet-stream
235-
236156 - name : Upload Release Asset (linux-x64)
237157 uses : actions/upload-release-asset@v1.0.2
238158 env :
@@ -243,16 +163,6 @@ jobs:
243163 asset_name : actions-runner-linux-x64-${{ steps.releaseNote.outputs.version }}.tar.gz
244164 asset_content_type : application/octet-stream
245165
246- - name : Upload Release Asset (osx-x64)
247- uses : actions/upload-release-asset@v1.0.2
248- env :
249- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
250- with :
251- upload_url : ${{ steps.createRelease.outputs.upload_url }}
252- asset_path : ${{ github.workspace }}/actions-runner-osx-x64-${{ steps.releaseNote.outputs.version }}.tar.gz
253- asset_name : actions-runner-osx-x64-${{ steps.releaseNote.outputs.version }}.tar.gz
254- asset_content_type : application/octet-stream
255-
256166 - name : Upload Release Asset (osx-arm64)
257167 uses : actions/upload-release-asset@v1.0.2
258168 env :
@@ -262,85 +172,3 @@ jobs:
262172 asset_path : ${{ github.workspace }}/actions-runner-osx-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz
263173 asset_name : actions-runner-osx-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz
264174 asset_content_type : application/octet-stream
265-
266- - name : Upload Release Asset (linux-arm)
267- uses : actions/upload-release-asset@v1.0.2
268- env :
269- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
270- with :
271- upload_url : ${{ steps.createRelease.outputs.upload_url }}
272- asset_path : ${{ github.workspace }}/actions-runner-linux-arm-${{ steps.releaseNote.outputs.version }}.tar.gz
273- asset_name : actions-runner-linux-arm-${{ steps.releaseNote.outputs.version }}.tar.gz
274- asset_content_type : application/octet-stream
275-
276- - name : Upload Release Asset (linux-arm64)
277- uses : actions/upload-release-asset@v1.0.2
278- env :
279- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
280- with :
281- upload_url : ${{ steps.createRelease.outputs.upload_url }}
282- asset_path : ${{ github.workspace }}/actions-runner-linux-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz
283- asset_name : actions-runner-linux-arm64-${{ steps.releaseNote.outputs.version }}.tar.gz
284- asset_content_type : application/octet-stream
285-
286- publish-image :
287- needs : release
288- runs-on : ubuntu-latest
289- permissions :
290- contents : read
291- packages : write
292- id-token : write
293- attestations : write
294- env :
295- REGISTRY : ghcr.io
296- IMAGE_NAME : ${{ github.repository_owner }}/actions-runner
297- steps :
298- - name : Checkout repository
299- uses : actions/checkout@v6
300-
301- - name : Compute image version
302- id : image
303- uses : actions/github-script@v8
304- with :
305- script : |
306- const fs = require('fs');
307- const runnerVersion = fs.readFileSync('${{ github.workspace }}/releaseVersion', 'utf8').replace(/\n$/g, '')
308- console.log(`Using runner version ${runnerVersion}`)
309- core.setOutput('version', runnerVersion);
310-
311- - name : Setup Docker buildx
312- uses : docker/setup-buildx-action@v3
313-
314- - name : Log into registry ${{ env.REGISTRY }}
315- uses : docker/login-action@v3
316- with :
317- registry : ${{ env.REGISTRY }}
318- username : ${{ github.actor }}
319- password : ${{ secrets.GITHUB_TOKEN }}
320-
321- - name : Build and push Docker image
322- id : build-and-push
323- uses : docker/build-push-action@v6
324- with :
325- context : ./images
326- platforms : |
327- linux/amd64
328- linux/arm64
329- tags : |
330- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.version }}
331- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
332- build-args : |
333- RUNNER_VERSION=${{ steps.image.outputs.version }}
334- push : true
335- labels : |
336- org.opencontainers.image.source=${{github.server_url}}/${{github.repository}}
337- org.opencontainers.image.licenses=MIT
338- annotations : |
339- org.opencontainers.image.description=https://github.com/actions/runner/releases/tag/v${{ steps.image.outputs.version }}
340-
341- - name : Generate attestation
342- uses : actions/attest-build-provenance@v3
343- with :
344- subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
345- subject-digest : ${{ steps.build-and-push.outputs.digest }}
346- push-to-registry : true
0 commit comments