-
-
Notifications
You must be signed in to change notification settings - Fork 3
129 lines (110 loc) · 4.11 KB
/
registry.yml
File metadata and controls
129 lines (110 loc) · 4.11 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Registry Client CI
on:
push:
pull_request:
jobs:
btp:
name: Build-Tag-Push
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 24 ]
env:
COMPONENT: registry
IMAGE_NAME: registry-client
PUBLIC_IMAGE_PREFIX: datastewardshipwizard
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_META_CONTEXT: '.'
DOCKER_META_FILE: './app-registry/docker/Dockerfile'
DOCKER_META_PLATFORMS: 'linux/amd64,linux/arm64'
steps:
- name: '[setup] Checkout Project'
uses: actions/checkout@v6
- name: '[setup] QEMU'
uses: docker/setup-qemu-action@v3
- name: '[setup] Docker Buildx'
id: buildx
uses: docker/setup-buildx-action@v4
- name: '[setup] Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: '[app] Elm Kernel Replacements'
run: npm run replace-kernel-packages
- name: '[app] Install'
run: npm ci
- name: '[app] Test'
run: |
npm run test:$COMPONENT
- name: '[app] Build'
run: |
npm run build:$COMPONENT
- name: '[docker] Meta'
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.PUBLIC_IMAGE_PREFIX }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
- name: '[docker] Build'
uses: docker/build-push-action@v6
with:
context: ${{ env.DOCKER_META_CONTEXT }}
file: ${{ env.DOCKER_META_FILE }}
platforms: ${{ env.DOCKER_META_PLATFORMS }}
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: '[docker] Login'
if: github.event_name != 'pull_request' && env.DOCKER_HUB_USERNAME != ''
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: '[docker-dev] Meta'
id: meta-dev
if: github.event_name != 'pull_request' && env.DOCKER_HUB_USERNAME != ''
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
flavor: |
suffix=${{ env.DOCKER_META_SUFFIX }}
- name: '[docker-dev] Build + Push'
uses: docker/build-push-action@v6
if: github.event_name != 'pull_request' && steps.meta-dev.outputs.tags != '' && env.DOCKER_HUB_USERNAME != ''
with:
context: ${{ env.DOCKER_META_CONTEXT }}
file: ${{ env.DOCKER_META_FILE }}
platforms: ${{ env.DOCKER_META_PLATFORMS }}
push: true
tags: ${{ steps.meta-dev.outputs.tags }}
labels: ${{ steps.meta-dev.outputs.labels }}
- name: '[docker-public] Meta'
id: meta-public
if: github.event_name != 'pull_request' && env.DOCKER_HUB_USERNAME != ''
uses: docker/metadata-action@v5
with:
images: |
${{ env.PUBLIC_IMAGE_PREFIX }}/${{ env.IMAGE_NAME }}
${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
flavor: |
suffix=${{ env.DOCKER_META_SUFFIX }}
- name: '[docker-public] Build + Push'
uses: docker/build-push-action@v6
if: github.event_name != 'pull_request' && steps.meta-public.outputs.tags != '' && env.DOCKER_HUB_USERNAME != ''
with:
context: ${{ env.DOCKER_META_CONTEXT }}
file: ${{ env.DOCKER_META_FILE }}
platforms: ${{ env.DOCKER_META_PLATFORMS }}
push: true
tags: ${{ steps.meta-public.outputs.tags }}
labels: ${{ steps.meta-public.outputs.labels }}