Skip to content

Build Stack Images

Build Stack Images #15

name: Build Stack Images
on:
workflow_dispatch:
inputs:
tag:
description: 'Docker image tag'
required: false
default: 'latest'
type: string
build_nextjs_shadcn:
description: 'Build Next.js Shadcn Image'
type: boolean
default: false
build_nextjs_vanilla:
description: 'Build Next.js Vanilla Image'
type: boolean
default: false
build_nextjs_p5:
description: 'Build Next.js P5 Image'
type: boolean
default: false
build_nextjs_pixi:
description: 'Build Next.js Pixi Image'
type: boolean
default: false
build_angular_vanilla:
description: 'Build Angular Vanilla Image'
type: boolean
default: false
env:
REGISTRY: ghcr.io
jobs:
build-and-push:
strategy:
matrix:
include:
- name: nextjs-shadcn
dockerfile: images/NextjsShadcnDockerFile
condition: ${{ inputs.build_nextjs_shadcn }}
- name: nextjs-vanilla
dockerfile: images/NextjsVanillaDockerFile
condition: ${{ inputs.build_nextjs_vanilla }}
- name: nextjs-p5
dockerfile: images/NextjsP5DockerFile
condition: ${{ inputs.build_nextjs_p5 }}
- name: nextjs-pixi
dockerfile: images/NextjsPixiDockerFile
condition: ${{ inputs.build_nextjs_pixi }}
- name: angular-vanilla
dockerfile: images/AngularVanillaDockerFile
condition: ${{ inputs.build_angular_vanilla }}
if: ${{ matrix.condition == 'true' }}

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

View workflow run for this annotation

GitHub Actions / Build Stack Images

Invalid workflow file

The workflow is not valid. .github/workflows/build-stack-images.yml (Line: 55, Col: 9): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.condition == 'true'
name: Build ${{ matrix.name }} Image
runs-on: ubuntu-latest
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.name }}
tags: |
type=raw,value=${{ inputs.tag }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: frontend
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}