Merge pull request #124 from voxpupuli/updates #92
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 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 Puppetserver ${{ matrix.release }} container | |
uses: voxpupuli/gha-build-and-publish-a-container@v2 | |
with: | |
registry_password: ${{ secrets.GITHUB_TOKEN }} | |
build_args: | | |
PUPPET_RELEASE=${{ matrix.release }} | |
PUPPETSERVER_VERSION=${{ matrix.version }} | |
R10K_VERSION=${{ matrix.r10k_version }} | |
RUGGED_VERSION=${{ matrix.rugged_version }} | |
build_arch: linux/amd64,linux/arm64 | |
docker_username: voxpupulibot | |
docker_password: ${{ secrets.DOCKERHUB_BOT_PASSWORD }} | |
build_context: puppetserver | |
buildfile: puppetserver/Dockerfile | |
tags: | | |
ghcr.io/${{ github.repository }}:${{ matrix.version }}-${{ github.ref_name }} | |
ghcr.io/${{ github.repository }}:${{ matrix.version }}-latest | |
ghcr.io/${{ github.repository }}:latest | |
ghcr.io/voxpupuli/puppetserver:${{ matrix.version }}-${{ github.ref_name }} | |
ghcr.io/voxpupuli/puppetserver:${{ matrix.version }}-latest | |
ghcr.io/voxpupuli/puppetserver:latest | |
docker.io/${{ github.repository }}:${{ matrix.version }}-${{ github.ref_name }} | |
docker.io/${{ github.repository }}:${{ matrix.version }}-latest | |
docker.io/${{ github.repository }}:latest | |
docker.io/voxpupuli/puppetserver:${{ matrix.version }}-${{ github.ref_name }} | |
docker.io/voxpupuli/puppetserver:${{ matrix.version }}-latest | |
docker.io/voxpupuli/puppetserver:latest | |
- name: Update Docker Hub Description | |
uses: peter-evans/dockerhub-description@v4 | |
with: | |
username: voxpupulibot | |
password: ${{ secrets.DOCKERHUB_BOT_PASSWORD }} | |
- name: Update Docker Hub Description for shortname | |
uses: peter-evans/dockerhub-description@v4 | |
with: | |
username: voxpupulibot | |
password: ${{ secrets.DOCKERHUB_BOT_PASSWORD }} | |
repository: voxpupuli/puppetserver |