Bot Updating Package Versions #341
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: build-on-commit | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
base: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- run: > | |
cd base-images && | |
docker buildx build --push | |
--file Dockerfile.${{ matrix.name }} | |
--platform linux/amd64,linux/arm64 | |
--build-arg REPO=${GITHUB_REPOSITORY,,} | |
--tag ghcr.io/${GITHUB_REPOSITORY,,}:${{ matrix.name }} . | |
strategy: | |
matrix: | |
include: | |
- name: alpine-320 | |
- name: alpine-edge | |
- name: debian-bookworm | |
- name: debian-sid | |
- name: ubuntu-jammy | |
- name: ubuntu-noble | |
meta: | |
name: Ingest Metadata | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-meta.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set-meta | |
run: | | |
curl -o yq -L "https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64" | |
chmod +x yq | |
echo "matrix=$(./yq -o=j -I=0 '.' metadata/metadata.yml)" >> $GITHUB_OUTPUT | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
needs: | |
- base | |
- meta | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: | | |
folder: | |
- "apps/${{ matrix.name }}/**" | |
- if: steps.changes.outputs.folder == 'true' | |
run: > | |
cd apps/${{ matrix.name }}/ && | |
docker buildx build --push | |
--platform ${{ matrix.arch }} | |
--build-arg REPO=${GITHUB_REPOSITORY,,} | |
--tag ghcr.io/${GITHUB_REPOSITORY,,}:${{ matrix.name }} . | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.meta.outputs.matrix) }} |