Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .github/workflows/build-guest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
build:
runs-on: yocto-builder
timeout-minutes: 480
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -31,8 +33,33 @@ jobs:
repro-build/dist/reproduce.sh
retention-days: 30

release:
if: inputs.tag != '' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
needs: build
runs-on: yocto-builder
timeout-minutes: 60
environment: release
permissions:
contents: write
steps:
- name: Checkout default branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: guest-images
path: repro-build/dist

- name: Validate release tag
env:
TAG: ${{ inputs.tag }}
run: |
echo "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.-]+)?$'

- name: Create tag and release
if: inputs.tag != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ inputs.tag }}
Expand Down
Loading