Skip to content

more json gymnastics #13

more json gymnastics

more json gymnastics #13

Workflow file for this run

---
on: push
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
dist: ${{ steps.read-matrix.outputs.dist }}
steps:
- uses: actions/checkout@v3
- name: read matrix.json
id: read-matrix
run: echo "dist=\'$(jq -r '@json' < matrix.json)\'" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: [prepare-matrix]
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: "${{ github.actor }}"
password: "${{ github.token }}"
- uses: docker/bake-action@v3
env:
UPSTREAM_TAG: "0.0.0-${{ matrix.dist.OS }}.${{ matrix.dist.OS_VER }}"
TARGET_SLUG: "${{ github.repository }}"
TARGET_TAG: "0.0.0-${{ matrix.dist.OS }}.${{ matrix.dist.OS_VER }}"
SHA: "${{ github.sha }}"
with:
pull: true
push: true
files: docker-bake.hcl
strategy:
fail-fast: false
matrix:
dist: ${{ fromJSON(needs.prepare-matrix.outputs.dist) }}