Skip to content

Publish HCW Docker images with i18n translations #4

Publish HCW Docker images with i18n translations

Publish HCW Docker images with i18n translations #4

name: Publish HCW Docker images with i18n translations
on:
workflow_dispatch:
env:
REGISTRY: ghcr.io
HCW_ADMIN_VERSION: 5.0.2
HCW_ADMIN_IMAGE_NAME: hcw-admin
HCW_ADMIN_CONTEXT: ./admin
HCW_DOCTOR_VERSION: 5.0.9
HCW_DOCTOR_IMAGE_NAME: hcw-doctor
HCW_DOCTOR_CONTEXT: ./doctor
HCW_PATIENT_VERSION: 5.0.14
HCW_PATIENT_IMAGE_NAME: hcw-patient
HCW_PATIENT_CONTEXT: ./patient
HCW_BACKEND_VERSION: 5.0.19
HCW_BACKEND_IMAGE_NAME: hcw-backend
HCW_BACKEND_CONTEXT: ./backend
IMAGE_TAG: latest
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- 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 (tags, labels) for Docker Admin
id: meta-admin
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.HCW_ADMIN_IMAGE_NAME }}
tags: |
type=raw,value=${{ env.HCW_ADMIN_VERSION }}-${{ env.IMAGE_TAG }}
type=sha
- name: Extract metadata (tags, labels) for Docker Doctor
id: meta-doctor
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.HCW_DOCTOR_IMAGE_NAME }}
tags: |
type=raw,value=${{ env.HCW_DOCTOR_VERSION }}-${{ env.IMAGE_TAG }}
type=sha
- name: Extract metadata (tags, labels) for Docker Patient
id: meta-patient
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.HCW_PATIENT_IMAGE_NAME }}
tags: |
type=raw,value=${{ env.HCW_PATIENT_VERSION }}-${{ env.IMAGE_TAG }}
type=sha
- name: Extract metadata (tags, labels) for Docker Backend
id: meta-backend
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.HCW_BACKEND_IMAGE_NAME }}
tags: |
type=raw,value=${{ env.HCW_BACKEND_VERSION }}-${{ env.IMAGE_TAG }}
type=sha
- name: Build and push HCW Admin v${{ env.HCW_ADMIN_VERSION }} i18n Docker image
uses: docker/build-push-action@v5
with:
context: ${{ env.HCW_ADMIN_CONTEXT }}
build-args: |
HCW_ADMIN_VERSION=${{ env.HCW_ADMIN_VERSION }}
push: true
tags: ${{ steps.meta-admin.outputs.tags }}
labels: ${{ steps.meta-admin.outputs.labels }}
- name: Build and push HCW Doctor v${{ env.HCW_DOCTOR_VERSION }} i18n Docker image
uses: docker/build-push-action@v5
with:
context: ${{ env.HCW_DOCTOR_CONTEXT }}
build-args: |
HCW_DOCTOR_VERSION=${{ env.HCW_DOCTOR_VERSION }}
push: true
tags: ${{ steps.meta-doctor.outputs.tags }}
labels: ${{ steps.meta-doctor.outputs.labels }}
- name: Build and push HCW PATIENT v${{ env.HCW_PATIENT_VERSION }} i18n Docker image
uses: docker/build-push-action@v5
with:
context: ${{ env.HCW_PATIENT_CONTEXT }}
build-args: |
HCW_PATIENT_VERSION=${{ env.HCW_PATIENT_VERSION }}
push: true
tags: ${{ steps.meta-patient.outputs.tags }}
labels: ${{ steps.meta-patient.outputs.labels }}
- name: Build and push HCW BACKEND v${{ env.HCW_BACKEND_VERSION }} i18n Docker image
uses: docker/build-push-action@v5
with:
context: ${{ env.HCW_BACKEND_CONTEXT }}
build-args: |
HCW_BACKEND_VERSION=${{ env.HCW_BACKEND_VERSION }}
push: true
tags: ${{ steps.meta-backend.outputs.tags }}
labels: ${{ steps.meta-backend.outputs.labels }}