Skip to content

[toolchain] Add envsubst to utility toolchain #57

[toolchain] Add envsubst to utility toolchain

[toolchain] Add envsubst to utility toolchain #57

Workflow file for this run

name: Toolchain
on:
push:
paths:
- '.github/workflows/toolchain.yml'
- 'toolchain/**'
- '!toolchain/*.md'
workflow_dispatch:
schedule:
- cron: '0 3 1 * *'
jobs:
common:
name: Build (baseline)
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up builder
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
context: toolchain
target: baseline
push: false
cache-to: |
type=gha,mode=max,scope=${{ github.ref_name }}-common
build:
name: Build
runs-on: ubuntu-latest
needs: common
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
subpkg:
- arm32
- arm64
- i386
- loong64
- riscv32
- riscv64
- utils
- x86_64
env:
pkgname: ipxe-builder-${{ matrix.subpkg }}
reponame: ghcr.io/${{ github.repository_owner }}
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up builder
uses: docker/setup-buildx-action@v3
- name: Build (${{ matrix.subpkg }})
uses: docker/build-push-action@v6
with:
context: toolchain
target: ${{ matrix.subpkg }}
push: true
cache-from: |
type=gha,mode=max,scope=${{ github.ref_name }}-common
tags: |
${{ env.reponame }}/${{ env.pkgname }}:draft-${{ github.sha }}
- name: Build (checker)
uses: docker/build-push-action@v6
with:
context: toolchain
target: check-${{ matrix.subpkg }}
push: false
load: true
tags: |
check-${{ matrix.subpkg }}
- name: Test
run: |
docker run --rm check-${{ matrix.subpkg }}
publish:
name: Publish
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
subpkg:
- arm32
- arm64
- i386
- loong64
- riscv32
- riscv64
- utils
- x86_64
env:
pkgname: ipxe-builder-${{ matrix.subpkg }}
reponame: ghcr.io/${{ github.repository_owner }}
label: ${{ github.ref_name == 'master' && 'latest' || github.ref_name }}
steps:
- name: Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up builder
uses: docker/setup-buildx-action@v3
- name: Publish
run: |
docker buildx imagetools create \
--tag ${{ env.reponame }}/${{ env.pkgname }}:${{ env.label }} \
${{ env.reponame }}/${{ env.pkgname }}:draft-${{ github.sha }}