-
-
Notifications
You must be signed in to change notification settings - Fork 16
153 lines (142 loc) · 5 KB
/
release.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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: Release new Docker image
on:
push:
tags:
- 'v*'
workflow_dispatch:
env:
BASE_IMAGE_NAME: plone/server
PLATFORMS: linux/amd64,linux/arm64
IS_LATEST: true
jobs:
meta:
runs-on: ubuntu-latest
outputs:
BASE_IMAGE_NAME: ${{ steps.vars.outputs.BASE_IMAGE_NAME }}
IS_LATEST: ${{ steps.vars.outputs.IS_LATEST }}
PLATFORMS: ${{ steps.vars.outputs.PLATFORMS }}
PLONE_VERSION: ${{ steps.vars.outputs.PLONE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set BASE_IMAGE_NAME, IS_LATEST, PLATFORMS, PLONE_VERSION
id: vars
run: |
echo "BASE_IMAGE_NAME=$BASE_IMAGE_NAME" >> $GITHUB_OUTPUT
echo "PLATFORMS=$PLATFORMS" >> $GITHUB_OUTPUT
echo "IS_LATEST=$IS_LATEST" >> $GITHUB_OUTPUT
echo "PLONE_VERSION=$(cat version.txt)" >> $GITHUB_OUTPUT
builder-image:
needs:
- meta
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-builder
dockerfile: Dockerfile.builder
platforms: ${{ needs.meta.outputs.PLATFORMS }}
is-latest: ${{ needs.meta.outputs.IS_LATEST == 'true' }}
load: false
push: true
secrets:
ghcr-registry-username: ${{ github.actor }}
ghcr-registry-password: ${{ secrets.GITHUB_TOKEN }}
docker-registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
prod-conf-image:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-prod-config
dockerfile: Dockerfile.prod
platforms: ${{ needs.meta.outputs.PLATFORMS }}
is-latest: ${{ needs.meta.outputs.IS_LATEST == 'true' }}
load: false
push: true
secrets:
ghcr-registry-username: ${{ github.actor }}
ghcr-registry-password: ${{ secrets.GITHUB_TOKEN }}
docker-registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
needs:
- meta
dev-image:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-dev
dockerfile: Dockerfile.dev
platforms: ${{ needs.meta.outputs.PLATFORMS }}
is-latest: ${{ needs.meta.outputs.IS_LATEST == 'true' }}
load: false
push: true
secrets:
ghcr-registry-username: ${{ github.actor }}
ghcr-registry-password: ${{ secrets.GITHUB_TOKEN }}
docker-registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
needs:
- meta
- builder-image
acceptance-image:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
image-name: ${{ needs.meta.outputs.BASE_IMAGE_NAME }}-acceptance
dockerfile: Dockerfile.acceptance
platforms: ${{ needs.meta.outputs.PLATFORMS }}
is-latest: ${{ needs.meta.outputs.IS_LATEST == 'true' }}
load: false
push: true
secrets:
ghcr-registry-username: ${{ github.actor }}
ghcr-registry-password: ${{ secrets.GITHUB_TOKEN }}
docker-registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
needs:
- meta
- builder-image
- prod-conf-image
plone-backend:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
image-name: |
ghcr.io/plone/server
ghcr.io/plone/plone-backend
plone/plone-backend
dockerfile: Dockerfile
platforms: ${{ needs.meta.outputs.PLATFORMS }}
is-latest: ${{ needs.meta.outputs.IS_LATEST == 'true' }}
load: false
push: true
secrets:
ghcr-registry-username: ${{ github.actor }}
ghcr-registry-password: ${{ secrets.GITHUB_TOKEN }}
docker-registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
needs:
- meta
- builder-image
- prod-conf-image
plone-classicui:
uses: ./.github/workflows/image-release.yml
with:
plone-version: ${{ needs.meta.outputs.PLONE_VERSION }}
image-name: |
ghcr.io/plone/plone-classicui
plone/plone-classicui
dockerfile: Dockerfile.classicui
platforms: ${{ needs.meta.outputs.PLATFORMS }}
is-latest: ${{ needs.meta.outputs.IS_LATEST == 'true' }}
load: false
push: true
secrets:
ghcr-registry-username: ${{ github.actor }}
ghcr-registry-password: ${{ secrets.GITHUB_TOKEN }}
docker-registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
docker-registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
needs:
- meta
- builder-image
- prod-conf-image