use self hosted wolfi runners for pre/postsubmit builds #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Reusable build workflow | |
on: | |
workflow_call: | |
inputs: | |
image: | |
required: true | |
type: string | |
jobs: | |
build: | |
runs-on: wolfi-builder-${{ matrix.arch }} | |
strategy: | |
fail-fast: true | |
matrix: | |
arch: ["x86_64", "aarch64"] | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
# TODO: Replace this with custom wolfi image | |
- run: | | |
sudo apt update -y && \ | |
sudo apt install unzip curl cmake pkg-config -y | |
- id: melange | |
uses: chainguard-dev/actions/melange-build@main | |
with: | |
multi-config: configs/latest.melange.yaml | |
empty-workspace: false | |
workdir: images/${{ matrix.image }} | |
sign-with-temporary-key: true | |
archs: ${{ matrix.arch }} | |
- name: 'Upload built packages archive to Github Artifacts' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ inputs.image }}-${{ matrix.arch }} | |
path: ./packages | |
retention-days: 1 # Low ttl since this is just an intermediary used once | |
if-no-files-found: error | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
# Fetch the build stages back down | |
- name: 'Download package archives' | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ inputs.image }}-aarch64 | |
path: . | |
- name: 'Download package archives' | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ inputs.image }}-x86_64 | |
path: . | |
- runs: ls -lahtR . |