Skip to content

Build Guest Images

Build Guest Images #7

Workflow file for this run

name: Build Guest Images
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to create and release (e.g. v0.5.9). Leave empty to build only.'
required: false
default: ''
type: string
jobs:
build:
runs-on: yocto-builder
timeout-minutes: 480
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build guest images
run: |
source dev-setup bb-build
make dist DIST_DIR=$PWD/dist BB_BUILD_DIR=$PWD/bb-build
- name: Generate reproduce.sh
run: |
cat > dist/reproduce.sh <<EOF
#!/bin/bash
set -e
git clone https://github.com/Dstack-TEE/meta-dstack.git
cd meta-dstack/
git checkout ${{ github.sha }}
git submodule update --init --recursive
cd repro-build && ./repro-build.sh -n
EOF
chmod +x dist/reproduce.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: guest-images
path: |
dist/*.tar.gz
dist/reproduce.sh
retention-days: 30
- name: Create tag and release
if: inputs.tag != ''
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ inputs.tag }}
run: |
git tag "$TAG"
git push origin "$TAG"
gh release create "$TAG" \
dist/*.tar.gz \
dist/reproduce.sh \
--title "$TAG" --generate-notes