Skip to content

container-images

container-images #14

name: container-images
on:
workflow_dispatch:
jobs:
collect:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.collect.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v3
- id: collect
run: |
echo "matrix={\"image\":$(./.github/list-images)}" >> $GITHUB_OUTPUT
docker:
needs: collect
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJSON(needs.collect.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: container-images
file: container-images/Containerfile.${{ matrix.image }}
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/m1cha/homeserver/${{ matrix.image }}:latest