fix: externalize all english strings, refactor some key names (WIP, #… #353
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 and Release Image | |
on: | |
workflow_dispatch: | |
inputs: | |
imageName: | |
description: 'Name of the image, that will be available as package' | |
required: true | |
type: string | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: ghcr.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: edc-ui | |
IMAGE_NAME_BASE: ${{ github.repository_owner }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
# Checkout code | |
- uses: actions/checkout@v3 | |
- name: Log in to the Container registry (push-only) | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Store last commit's author, message and SHA | |
run: | | |
echo "Saving local commit details in src/assets/config/version.txt" | |
git log -1 > src/assets/config/version.txt | |
echo "Saving build date to src/assets/config/ui-build-date.txt" | |
date --utc +%FT%TZ > src/assets/config/ui-build-date.txt | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_BASE }}/${{ env.IMAGE_NAME }} | |
labels: | | |
org.opencontainers.image.title=EDC-UI extended by sovity | |
org.opencontainers.image.description=EDC-UI for sovity's extended EDC-Connector. | |
tags: | | |
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/') }} | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=sha,enable={{is_default_branch}} | |
type=raw,value=${{ inputs.imageName }},enabled=${{ github.event_name == 'workflow_dispatch' }} | |
- name: Build EDC-UI image | |
uses: docker/build-push-action@v4 | |
with: | |
file: docker/Dockerfile | |
context: . | |
build-args: | | |
EDC_UI_CONFIGURATION=production | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |