Skip to content

Add source checkout step to workflow. #70

Add source checkout step to workflow.

Add source checkout step to workflow. #70

Workflow file for this run

on:
- push
name: Build 🛢️ container
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 "::set-output name=matrix::$(cat build_versions.json | jq '. | tostring')"
run: echo "matrix=$(cat build_versions.json | jq '. | tostring')" >> $GITHUB_OUTPUT
build_job:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: setup-matrix
strategy:
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
steps:
- name: Build version ${{ matrix.release }} container
uses: rwaffen/gha-build-and-publish-a-container@refactor_tagging
with:
# registry: docker.io # Default: ghcr.io
# registry_username: foobar # Default: github.repository_owner
registry_password: ${{ secrets.GITHUB_TOKEN }}
# build_arch: linux/amd64,linux/arm64 # Default: linux/amd64
build_args: |
PUPPET_VERSION=${{ matrix.release }}
PUPPET_RELEASE=${{ matrix.version }}
# buildfile: Dockerfile.something # Default: Dockerfile
# publish: 'false' # Default: true
# tags: |
# ghcr.io/betadots/gha-test-repo:devlopment
# ghcr.io/betadots/gha-test-repo:latest