Skip to content

Bake Image

Bake Image #82

Workflow file for this run

name: Bake Image
permissions:
contents: write
on:
workflow_dispatch:
push:
tags:
- "*"
jobs:
info:
name: Build information
runs-on: ubuntu-latest
outputs:
version: ${{ steps.info.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: extractions/setup-just@v1
- id: info
name: Get Version
run: |
case "${GITHUB_REF}" in
refs/tags/*)
version="${GITHUB_REF#refs/*/}"
echo "Using version from tag: $version"
;;
*)
version="$(just generate_version)"
echo "Using version from timestamp: $version"
;;
esac
echo "version=$version" >> "$GITHUB_OUTPUT"
bake-image:
name: Bake Image ${{ matrix.job.image }}
runs-on: ubuntu-latest
needs: info
strategy:
fail-fast: false
matrix:
job:
- { image: pi4 }
- { image: tryboot }
- { image: u-boot }
- { image: u-boot-armhf }
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: extractions/setup-just@v1
- id: info
env:
VERSION: ${{needs.info.outputs.version}}
run: |
source <(just show)
echo "IMAGE_NAME=$IMAGE_NAME" >> "$GITHUB_OUTPUT"
- name: Build image
env:
VERSION: ${{needs.info.outputs.version}}
run: |
just IMAGE=${{ matrix.job.image }} bake-image
- name: Upload Image
uses: actions/upload-artifact@v3
with:
name: ${{ steps.info.outputs.IMAGE_NAME }}
path: |
build/${{ steps.info.outputs.IMAGE_NAME }}*.xz
*.sbom.txt
release:
name: Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs:
- info
- bake-image
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: release
- name: Show release artifacts
run: ls -l release/*/*
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
generate_release_notes: true
draft: true
files: |
./release/*/*