Validate proposed builder images on both native architectures
This commit is contained in:
1 parent
ad328b725d
commit
30af71af24
2 files changed
+39
-1
No files matched your search
@@ -13,16 +13,52 @@ on:
|
|||||||
- tests/build-isolation.sh
|
- tests/build-isolation.sh
|
||||||
- .github/workflows/builder-images.yml
|
- .github/workflows/builder-images.yml
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- build/**
|
||||||
|
- bin/builder-image
|
||||||
|
- helpers/paths.sh
|
||||||
|
- helpers/docker-helpers.sh
|
||||||
|
- tests/build-isolation.sh
|
||||||
|
- .github/workflows/builder-images.yml
|
||||||
|
|
||||||
# Complete each refresh before another can replace its tested image tags.
|
# Complete each refresh before another can replace its tested image tags.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: builder-images
|
group: builder-images-${{ github.event.pull_request.number || 'master' }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# Exercise proposed image changes on native runners with a read-only token.
|
||||||
|
# Publishing is a separate master-only job with its own write permission.
|
||||||
|
validate:
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- arch: x86_64
|
||||||
|
runner: ubuntu-24.04
|
||||||
|
- arch: aarch64
|
||||||
|
runner: ubuntu-24.04-arm
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
|
timeout-minutes: 60
|
||||||
|
env:
|
||||||
|
CONTAINER_ENGINE: docker
|
||||||
|
CANDIDATE_IMAGE: omarchy-builder-candidate:${{ matrix.arch }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Build a fresh environment
|
||||||
|
run: bin/builder-image build --arch "${{ matrix.arch }}" --mirror edge --tag "$CANDIDATE_IMAGE" --fresh
|
||||||
|
- name: Test isolated package builds
|
||||||
|
env:
|
||||||
|
TEST_BUILDER_IMAGE: ${{ env.CANDIDATE_IMAGE }}
|
||||||
|
run: tests/build-isolation.sh
|
||||||
|
|
||||||
refresh:
|
refresh:
|
||||||
if: github.repository == 'omacom/omarchy-pkgs' && github.ref == 'refs/heads/master'
|
if: github.repository == 'omacom/omarchy-pkgs' && github.ref == 'refs/heads/master'
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -834,6 +834,8 @@ package-builder pool. Each candidate must pass `tests/build-isolation.sh`,
|
|||||||
including real package builds, before publication to
|
including real package builds, before publication to
|
||||||
`ghcr.io/omacom/omarchy-pkg-builder`. Only `master` in this repository can
|
`ghcr.io/omacom/omarchy-pkg-builder`. Only `master` in this repository can
|
||||||
publish; PR workflows cannot replace the shared images.
|
publish; PR workflows cannot replace the shared images.
|
||||||
|
PRs that change image inputs also build and test both candidates on native
|
||||||
|
runners, with a read-only token and no registry publication.
|
||||||
|
|
||||||
The compatibility tag contains the architecture, mirror, and a hash of the
|
The compatibility tag contains the architecture, mirror, and a hash of the
|
||||||
entire `build/` context, including executable bits and symlink targets but
|
entire `build/` context, including executable bits and symlink targets but
|
||||||
|
|||||||
Reference in new issue
Block a user