Skip to content

chore: update CI workflow to use 'dev' tag for backend and frontend i… #2

chore: update CI workflow to use 'dev' tag for backend and frontend i…

chore: update CI workflow to use 'dev' tag for backend and frontend i… #2

name: Build Release Images

Check failure on line 1 in .github/workflows/build-prod-images.yml

View workflow run for this annotation

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

Invalid workflow file

(Line: 49, Col: 17): Unexpected symbol: '+'. Located at position 60 within expression: github.event.inputs.set_latest_tag == 'true' && 'ghcr.io/' + github.repository + '-backend:latest' || '', (Line: 87, Col: 17): Unexpected symbol: '+'. Located at position 60 within expression: github.event.inputs.set_latest_tag == 'true' && 'ghcr.io/' + github.repository + '-frontend:latest' || ''
on:
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., 0.0.1-alpha)'
required: true
type: string
set_latest_tag:
description: 'Set latest tag'
required: false
default: 'true'
type: boolean
jobs:
build-and-push-backend:
runs-on: ubuntu-latest
environment: production
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout repo
uses: actions/checkout@v5
- name: Login to Github Container Registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for backend image
id: meta_backend
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
ghcr.io/${{ github.repository }}-backend
- name: Build and push Backend
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: backend
push: true
tags: |
${{ steps.meta_backend.outputs.tags }}
ghcr.io/${{ github.repository }}-backend:${{ github.event.inputs.version }}
${{ github.event.inputs.set_latest_tag == 'true' && 'ghcr.io/' + github.repository + '-backend:latest' || '' }}
labels: ${{ steps.meta_backend.outputs.labels }}
build-and-push-frontend:
runs-on: ubuntu-latest
environment: production
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout repo
uses: actions/checkout@v5
- name: Login to Github Container Registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for frontend image
id: meta_frontend
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
ghcr.io/${{ github.repository }}-frontend
- name: Build and push Frontend
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: frontend
push: true
tags: |
${{ steps.meta_frontend.outputs.tags }}
ghcr.io/${{ github.repository }}-frontend:${{ github.event.inputs.version }}
${{ github.event.inputs.set_latest_tag == 'true' && 'ghcr.io/' + github.repository + '-frontend:latest' || '' }}
labels: ${{ steps.meta_frontend.outputs.labels }}