Split builds into base and distro
This commit is contained in:
@ -2,32 +2,50 @@ name: Publish Builder Images
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'Dockerfile.base'
|
||||
- 'Dockerfile.windows'
|
||||
- 'build.sh'
|
||||
- 'Dockerfile.*'
|
||||
- '*.sh'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
# JOB 1: Handles the Fedora Base
|
||||
build-base:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Make script executable
|
||||
run: chmod +x build.sh
|
||||
- name: Make scripts executable
|
||||
run: chmod +x *.sh
|
||||
|
||||
# Optional: Restore DNF Cache (if you are using the cache strategy)
|
||||
|
||||
- name: Run Build Script
|
||||
- name: Build/Cache Base
|
||||
uses: docker://quay.io/buildah/stable
|
||||
env:
|
||||
# Standard Gitea env vars
|
||||
USERNAME: ${{ gitea.repository_owner }}
|
||||
PASSWORD: ${{ secrets.USER_PACKAGE_PASSWORD }}
|
||||
REGISTRY: gitea.212.63.210.91.nip.io
|
||||
|
||||
# We use the short SHA for the tag
|
||||
with:
|
||||
entrypoint: /bin/sh
|
||||
args: ./build-base.sh
|
||||
|
||||
# JOB 2: Handles the Windows Builder
|
||||
# Only runs if Base succeeds.
|
||||
build-windows:
|
||||
needs: build-base
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Make scripts executable
|
||||
run: chmod +x *.sh
|
||||
|
||||
- name: Build Windows Target
|
||||
uses: docker://quay.io/buildah/stable
|
||||
env:
|
||||
USERNAME: ${{ gitea.repository_owner }}
|
||||
PASSWORD: ${{ secrets.USER_PACKAGE_PASSWORD }}
|
||||
REGISTRY: gitea.212.63.210.91.nip.io
|
||||
# We pass the Git SHA here for the final image tag
|
||||
TAG: ${{ gitea.sha }}
|
||||
with:
|
||||
entrypoint: /bin/sh
|
||||
args: ./build.sh
|
||||
args: ./build-windows.sh
|
||||
Reference in New Issue
Block a user