Build Stack Images #14
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: 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: | ||
app: | ||
- name: nextjs-shadcn | ||
dockerfile: images/NextjsShadcnDockerFile | ||
input: build_nextjs_shadcn | ||
- name: nextjs-vanilla | ||
dockerfile: images/NextjsVanillaDockerFile | ||
input: build_nextjs_vanilla | ||
- name: nextjs-p5 | ||
dockerfile: images/NextjsP5DockerFile | ||
input: build_nextjs_p5 | ||
- name: nextjs-pixi | ||
dockerfile: images/NextjsPixiDockerFile | ||
input: build_nextjs_pixi | ||
- name: angular-vanilla | ||
dockerfile: images/AngularVanillaDockerFile | ||
input: build_angular_vanilla | ||
if: ${{ inputs[format('{0}', matrix.app.input)] == 'true' }} | ||
Check failure on line 55 in .github/workflows/build-stack-images.yml GitHub Actions / Build Stack ImagesInvalid workflow file
|
||
name: Build ${{ matrix.app.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.app.name }} | ||
tags: | | ||
type=raw,value=${{ inputs.tag }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: frontend | ||
file: ${{ matrix.app.dockerfile }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |