Skip to content
name: Build Stack Images
on:
workflow_dispatch:
inputs:
tag:
description: 'Docker image tag'
required: false
default: 'latest'
type: string
stack:
description: 'Which stack to build (leave empty to build all)'
required: false
type: choice
options:
- all
- angular-vanilla
- nextjs-shadcn
- nextjs-vanilla
- nextjs-p5
- nextjs-pixi
default: 'all'
env:
REGISTRY: ghcr.io
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:

Check failure on line 31 in .github/workflows/build-stack-images.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-stack-images.yml

Invalid workflow file

You have an error in your yaml syntax on line 31
include: ${{
inputs.stack == 'all' && fromJSON('[
{"name":"angular-vanilla","dockerfile":"images/AngularVanillaDockerFile"},
{"name":"nextjs-shadcn","dockerfile":"images/NextjsShadcnDockerFile"},
{"name":"nextjs-vanilla","dockerfile":"images/NextjsVanillaDockerFile"},
{"name":"nextjs-p5","dockerfile":"images/NextjsP5DockerFile"},
{"name":"nextjs-pixi","dockerfile":"images/NextjsPixiDockerFile"}
]') || fromJSON(toJSON(
inputs.stack == 'angular-vanilla' && [{"name":"angular-vanilla","dockerfile":"images/AngularVanillaDockerFile"}] ||
inputs.stack == 'nextjs-shadcn' && [{"name":"nextjs-shadcn","dockerfile":"images/NextjsShadcnDockerFile"}] ||
inputs.stack == 'nextjs-vanilla' && [{"name":"nextjs-vanilla","dockerfile":"images/NextjsVanillaDockerFile"}] ||
inputs.stack == 'nextjs-p5' && [{"name":"nextjs-p5","dockerfile":"images/NextjsP5DockerFile"}] ||
inputs.stack == 'nextjs-pixi' && [{"name":"nextjs-pixi","dockerfile":"images/NextjsPixiDockerFile"}]
))
}}
name: Build ${{ matrix.include.name }} Image
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}-pack-${{ matrix.include.name }}
tags: |
type=raw,value=${{ inputs.tag }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: frontend
file: ${{ matrix.include.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}