-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.42 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 -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
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