Skip to content

Drop these, hard to parse #44

Drop these, hard to parse

Drop these, hard to parse #44

Workflow file for this run

name: Build and publish Spare Cores images
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
jobs:
find-jobs:
runs-on: ubuntu-latest
name: Find Jobs
outputs:
folders: ${{ steps.jobs.outputs.folders }}
steps:
- uses: actions/checkout@v4
- id: jobs
uses: kmanimaran/list-folder-action@v4
with:
path: ./images
matrix:
runs-on: ubuntu-latest
name: Matrix Jobs
needs: [find-jobs]
defaults:
run:
working-directory: ${{ github.workspace }}/images/${{ matrix.folder }}
strategy:
matrix:
folder: ${{ fromJson(needs.find-jobs.outputs.folders )}}
permissions:
contents: read
packages: write
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/sparecores/${{ matrix.folder }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ${{ github.workspace }}/images/${{ matrix.folder }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max