Skip to content

fix(ci): configure the repo url for doc #8

fix(ci): configure the repo url for doc

fix(ci): configure the repo url for doc #8

Workflow file for this run

name: Build Frontend
on:
push:
branches:
- '**'
tags-ignore:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-frontend
jobs:
docker-build:
runs-on: ubuntu-latest
name: Docker image build
permissions:
packages: write
contents: read
steps:
# Checkout the repository code
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to the Docker registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: string
name: Lowercase the name
uses: AsZc/change-string-case-action@v6
with:
string: ${{ env.IMAGE_NAME }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=schedule,pattern={{date 'YYYYMMDD-hhmmss' tz='Europe/Berlin'}}
type=semver,enable=true,priority=900,prefix=,suffix=,pattern=,value=
type=sha,prefix={{branch}}
flavor: |
latest=auto
suffix=-${{ matrix.environment.name }},onlatest=true
images: '${{ env.REGISTRY }}/${{ steps.string.outputs.lowercase }}'
- name: Build and push
uses: docker/build-push-action@v6
if: github.event_name != 'pull_request'
with:
push: 'true'
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
build-args: ${{ matrix.environment.docker-build-args }}
platforms: linux/amd64,linux/arm64