Skip to content

Commit 0a9a031

Browse files
committed
ci: add build-guest workflow for manual trigger with optional release
1 parent 48dd3df commit 0a9a031

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build-guest.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build Guest Images
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag to create and release (e.g. v0.5.9). Leave empty to build only.'
8+
required: false
9+
default: ''
10+
type: string
11+
12+
jobs:
13+
build:
14+
runs-on: yocto-builder
15+
timeout-minutes: 480
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
submodules: recursive
21+
22+
- name: Reproducible build
23+
run: cd repro-build && ./repro-build.sh -n
24+
25+
- name: Upload artifacts
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: guest-images
29+
path: |
30+
repro-build/dist/*.tar.gz
31+
repro-build/dist/reproduce.sh
32+
retention-days: 30
33+
34+
- name: Create tag and release
35+
if: inputs.tag != ''
36+
env:
37+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
TAG: ${{ inputs.tag }}
39+
run: |
40+
git tag "$TAG"
41+
git push origin "$TAG"
42+
gh release create "$TAG" \
43+
repro-build/dist/*.tar.gz \
44+
repro-build/dist/reproduce.sh \
45+
--title "$TAG" --generate-notes

0 commit comments

Comments
 (0)