-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (80 loc) · 3.19 KB
/
publish-hcw-docker-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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_PREFIX: hcw-admin
HCW_ADMIN_CONTEXT: ./admin
HCW_DOCTOR_VERSION: 5.0.9
HCW_DOCTOR_IMAGE_NAME_PREFIX: hcw-doctor
HCW_DOCTOR_CONTEXT: ./doctor
HCW_PATIENT_VERSION: 5.0.14
HCW_PATIENT_IMAGE_NAME_PREFIX: hcw-patient
HCW_PATIENT_CONTEXT: ./patient
HCW_BACKEND_VERSION: 5.0.19
HCW_BACKEND_IMAGE_NAME_PREFIX: 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
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.HCW_ADMIN_IMAGE_NAME_PREFIX }}-${{ env.HCW_ADMIN_VERSION }}
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.HCW_DOCTOR_IMAGE_NAME_PREFIX }}-${{ env.HCW_DOCTOR_VERSION }}
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.HCW_PATIENT_IMAGE_NAME_PREFIX }}-${{ env.HCW_PATIENT_VERSION }}
${{ env.REGISTRY }}/${{ github.repository }}/${{ env.HCW_BACKEND_IMAGE_NAME_PREFIX }}-${{ env.HCW_BACKEND_VERSION }}
tags: |
type=raw,value=${{ 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.outputs.tags }}
labels: ${{ steps.meta.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.outputs.tags }}
labels: ${{ steps.meta.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.outputs.tags }}
labels: ${{ steps.meta.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.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}