Skip to content

Publish frontend image to GHCR #22

Publish frontend image to GHCR

Publish frontend image to GHCR #22

name: Publish frontend image to GHCR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to publish'
required: true
default: 'latest'
permissions:
contents: read
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
name: Checkout
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
name: Login to GHCR
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: |
export FRONTEND_REF="$(tr '[:upper:]' '[:lower:]' <<<"${FRONTEND_REF}")"
docker buildx create --use
docker buildx bake --push \
--set frontend.platform=linux/amd64,linux/arm64 \
frontend
env:
FRONTEND_REF: ghcr.io/${{ github.repository }}/frontend:${{ github.event.inputs.tag }}