Merge pull request #6 from regolith-linux/ssh-agent #6
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: Publish Docker Images | |
on: | |
schedule: | |
- cron: "0 2 1 * *" | |
workflow_dispatch: | |
workflow_call: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
matrix-builder: | |
runs-on: ubuntu-24.04 | |
outputs: | |
includes: ${{ steps.builder.outputs.includes }} | |
steps: | |
- name: Build Matrix | |
id: builder | |
uses: regolith-linux/actions/build-matrix@main | |
with: | |
type: "platform" | |
stage: "unstable" | |
arch: "amd64 arm64" | |
build: | |
runs-on: ubuntu-24.04 | |
needs: matrix-builder | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Generate Packages List | |
run: | | |
packages="$(cat common-packages | grep -v "#" | tr '\n' ' ')" | |
packages+=" $(cat "${{ matrix.distro }}/${{ matrix.codename }}/additional-packages" | grep -v "#" | tr '\n' ' ')" | |
echo "packages=$packages" >> $GITHUB_ENV | |
- name: Build & Push ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }} Image | |
uses: docker/build-push-action@v6.10.0 | |
with: | |
context: . | |
platforms: "linux/${{ matrix.arch }}" | |
push: true | |
build-args: | | |
"REFERENCE=${{ matrix.distro }}:${{ matrix.codename }}" | |
"PACKAGES=${{ env.packages }}" | |
file: ${{ matrix.distro }}/Dockerfile | |
tags: ghcr.io/${{ github.repository_owner }}/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }} |