Skip to content

Commit

Permalink
test split
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaffen committed Jan 17, 2024
1 parent d3f9d65 commit 28f2d3a
Showing 1 changed file with 9 additions and 25 deletions.
34 changes: 9 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,22 @@ on:
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 "matrix=$(cat build_versions.json | jq -c)" >> $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
- name: cut v from tag
env:
TAG: ${{ github.ref_name }}
id: split
run: echo "tag=${TAG:1}" >> $GITHUB_OUTPUT

- name: Build container
uses: voxpupuli/gha-build-and-publish-a-container@v2
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/${{ github.repository }}:${{ github.ref_name }}-${{ matrix.release }}
ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ steps.split.outputs.tag }}
ghcr.io/${{ github.repository }}:latest

0 comments on commit 28f2d3a

Please sign in to comment.