Skip to content

Merge pull request #5 from voxpupuli/r10k_config #1

Merge pull request #5 from voxpupuli/r10k_config

Merge pull request #5 from voxpupuli/r10k_config #1

---
name: Build and publish a 🛢️ container
on:
push:
branches:
- 'main'
tags:
- '*'
workflow_dispatch:
jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Source checkout
uses: actions/checkout@v4
- id: set-matrix
run: echo "matrix=$(cat build_versions.json | jq -c)" >> $GITHUB_OUTPUT
build-and-push-container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: setup-matrix
strategy:
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
steps:
- name: Build R10K ${{ matrix.rubygem_r10k }} container
uses: voxpupuli/gha-build-and-publish-a-container@v2
with:
registry_password: ${{ secrets.GITHUB_TOKEN }}
build_args: |
RUBYGEM_R10K=${{ matrix.rubygem_r10k }}
RUBYGEM_PUPPET=${{ matrix.rubygem_puppet }}
APK_GIT=${{ matrix.apk_git }}
build_arch: linux/amd64,linux/arm64
docker_username: voxpupulibot
docker_password: ${{ secrets.DOCKERHUB_BOT_PASSWORD }}
build_context: .
buildfile: Dockerfile
tags: |
ghcr.io/voxpupuli/r10k:${{ matrix.rubygem_r10k }}-${{ github.ref_name }}
ghcr.io/voxpupuli/r10k:${{ matrix.rubygem_r10k }}-latest
ghcr.io/voxpupuli/r10k:latest
docker.io/voxpupuli/r10k:${{ matrix.rubygem_r10k }}-${{ github.ref_name }}
docker.io/voxpupuli/r10k:${{ matrix.rubygem_r10k }}-latest
docker.io/voxpupuli/r10k:latest
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: voxpupulibot
password: ${{ secrets.DOCKERHUB_BOT_PASSWORD }}
repository: voxpupuli/r10k