Skip to content

ci: read matrix output #738

ci: read matrix output

ci: read matrix output #738

Workflow file for this run

name: Automated builds
on:
push:
paths:
- "images/**"
- ".github/workflows/*"
pull_request: # They will only build the containers, not push them to our registry
paths:
- "images/**"
- ".github/workflows/*"
types:
- opened
- edited
- ready_for_review
- review_requested
- reopened
# schedule:
# - cron: "0 0 * * *" # nightly
jobs:
base:
uses: ./.github/workflows/docker-build-and-publish.yml
with:
image_name: "base"
secrets: inherit
base-app:
needs: [base]
uses: ./.github/workflows/docker-build-and-publish.yml
strategy:
matrix:
platforms:
- name: linux/amd64
runner: "ubuntu-latest"
- name: linux/arm64
runner: "ARM64"
with:
image_name: "base-app"
base_image: "${{ needs.base.outputs.image_tag }}"
platforms: "${{ matrix.platforms.name }}"
runner: "${{ matrix.platforms.runner }}"
secrets: inherit
## Read matrix base-app outputs
read-matrix:
runs-on: ubuntu-latest
needs: [base-app]
steps:
- uses: cloudposse/github-action-matrix-outputs-read@v1
id: read
with:
matrix-step-name: base-app
outputs:
results: "${{ steps.read.outputs.result }}"
apps-amd64:
needs: [base, base-app]
strategy:
matrix:
image:
- xorg
- pulseaudio
- udevd
- sunshine
- retroarch
- firefox
- steam
- pegasus
- lutris
- heroic-games-launcher
fail-fast: false
uses: ./.github/workflows/docker-build-and-publish.yml
with:
image_name: "${{ matrix.image }}"
base_image: "${{ needs.base.outputs.image_tag }}"
base_app_image: '${{ fromJson(needs.read.outputs.results).name["linux/amd64"] }}'

Check failure on line 77 in .github/workflows/auto-build.yml

View workflow run for this annotation

GitHub Actions / Automated builds

Invalid workflow file

The workflow is not valid. .github/workflows/auto-build.yml (Line: 77, Col: 23): Unexpected symbol: '"linux/amd64"'. Located at position 43 within expression: fromJson(needs.read.outputs.results).name["linux/amd64"] .github/workflows/auto-build.yml (Line: 91, Col: 23): Unexpected symbol: '"linux/arm64"'. Located at position 43 within expression: fromJson(needs.read.outputs.results).name["linux/arm64"]
secrets: inherit
apps-arm64:
needs: [base, base-app]
strategy:
matrix:
image:
- firefox
fail-fast: false
uses: ./.github/workflows/docker-build-and-publish.yml
with:
image_name: "${{ matrix.image }}"
base_image: "${{ needs.base.outputs.image_tag }}"
base_app_image: '${{ fromJson(needs.read.outputs.results).name["linux/arm64"] }}'
platforms: "linux/arm64"
runner: "ARM64"
secrets: inherit