ci: read matrix output #738
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 GitHub Actions / Automated buildsInvalid workflow file
|
||
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 |