-
-
Notifications
You must be signed in to change notification settings - Fork 41
161 lines (143 loc) · 5.96 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
154
155
156
157
158
159
160
161
name: Release
on:
push:
branches:
- main
- development
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- BUILD_IMAGE_DOCKERFILE: builds/debian/Base.Dockerfile
BUILD_IMAGE_TAG: latest
- BUILD_IMAGE_DOCKERFILE: builds/debian/Base.Dockerfile
BUILD_IMAGE_TAG: jre11
- BUILD_IMAGE_DOCKERFILE: builds/base/JDK11.Dockerfile
BUILD_IMAGE_TAG: jdk11
- BUILD_IMAGE_DOCKERFILE: builds/base/JDK17.Dockerfile
BUILD_IMAGE_TAG: jdk17
- BUILD_IMAGE_DOCKERFILE: builds/debian/Base.JDK8.Dockerfile
BUILD_IMAGE_TAG: jdk8
- BUILD_IMAGE_DOCKERFILE: builds/debian/Lucee5.Dockerfile
BUILD_IMAGE_TAG: lucee5
- BUILD_IMAGE_DOCKERFILE: builds/debian/LuceeLight.Dockerfile
BUILD_IMAGE_TAG: lucee-light
- BUILD_IMAGE_DOCKERFILE: builds/debian/Adobe2018.Dockerfile
BUILD_IMAGE_TAG: adobe2018
- BUILD_IMAGE_DOCKERFILE: builds/debian/Adobe2021.Dockerfile
BUILD_IMAGE_TAG: adobe2021
- BUILD_IMAGE_DOCKERFILE: builds/debian/Adobe2023.Dockerfile
BUILD_IMAGE_TAG: adobe2023
# ubi9 Builds
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Base.Dockerfile
BUILD_IMAGE_TAG: ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Base.Dockerfile
BUILD_IMAGE_TAG: jre11-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/base/ubi9.JDK11.Dockerfile
BUILD_IMAGE_TAG: jdk11-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/base/ubi9.JDK17.Dockerfile
BUILD_IMAGE_TAG: jdk17-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Lucee5.Dockerfile
BUILD_IMAGE_TAG: lucee5-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/LuceeLight.Dockerfile
BUILD_IMAGE_TAG: lucee-light-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Adobe2018.Dockerfile
BUILD_IMAGE_TAG: adobe2018-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Adobe2021.Dockerfile
BUILD_IMAGE_TAG: adobe2021-ubi9
- BUILD_IMAGE_DOCKERFILE: builds/ubi9/Adobe2023.Dockerfile
BUILD_IMAGE_TAG: adobe2023-ubi9
# Alpine builds
# Note: No JDK builders currently support alpine with ARM
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Base.Dockerfile
BUILD_IMAGE_TAG: alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Base.Dockerfile
BUILD_IMAGE_TAG: jre11-alpine
- BUILD_IMAGE_DOCKERFILE: builds/base/Alpine.JDK11.Dockerfile
BUILD_IMAGE_TAG: jdk11-alpine
- BUILD_IMAGE_DOCKERFILE: builds/base/Alpine.JDK17.Dockerfile
BUILD_IMAGE_TAG: jdk17-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Base.JDK8.Dockerfile
BUILD_IMAGE_TAG: jdk8-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Lucee5.Dockerfile
BUILD_IMAGE_TAG: lucee5-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/LuceeLight.Dockerfile
BUILD_IMAGE_TAG: lucee-light-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Adobe2018.Dockerfile
BUILD_IMAGE_TAG: adobe2018-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Adobe2021.Dockerfile
BUILD_IMAGE_TAG: adobe2021-alpine
- BUILD_IMAGE_DOCKERFILE: builds/alpine/Adobe2023.Dockerfile
BUILD_IMAGE_TAG: adobe2023-alpine
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Setup Builds
id: setup
env:
DOCKER_IMAGE: ortussolutions/commandbox
BUILD_IMAGE_TAG: ${{ matrix.BUILD_IMAGE_TAG }}
COMMANDBOX_VERSION: 6.0.0
IMAGE_VERSION: 3.9.0
run: |
# Tag Builds
if [[ $GITHUB_REF == refs/tags/* ]]; then
if [[ $BUILD_IMAGE_TAG == latest ]]; then
BUILD_IMAGE_TAG="${GITHUB_REF#refs/tags/v}"
else
BUILD_IMAGE_TAG="${BUILD_IMAGE_TAG}-${GITHUB_REF#refs/tags/v}"
fi
elif [[ $GITHUB_REF == 'refs/heads/development' ]]; then
# Snapshot builds
BUILD_IMAGE_TAG="${BUILD_IMAGE_TAG}-snapshot"
fi
TAGS="${DOCKER_IMAGE}:${BUILD_IMAGE_TAG}"
if [[ ${BUILD_IMAGE_TAG} == *"alpine"* ]]; then
ARCH_PLATFORMS=linux/amd64
else
ARCH_PLATFORMS=linux/amd64,linux/arm64/v8
fi
# Set output parameters.
echo "arch_platforms=${ARCH_PLATFORMS}" >> $GITHUB_ENV
echo "image_version=${IMAGE_VERSION}" >> $GITHUB_ENV
echo "commandbox_version=${COMMANDBOX_VERSION}" >> $GITHUB_ENV
echo "IMAGE_TAG=${TAGS}" >> $GITHUB_ENV
- name: DockerHub Login
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Test
env:
COMMANDBOX_VERSION: ${{ env.commandbox_version }}
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
BUILD_IMAGE_DOCKERFILE: ${{ matrix.BUILD_IMAGE_DOCKERFILE }}
run: |
docker-compose -f docker-compose.test.yml up --build --exit-code-from sut
docker-compose -f docker-compose.secret-test.yml up --build --exit-code-from sut
- name: Build Final
uses: docker/build-push-action@v4
env:
DOCKER_BUILDKIT: 1
with:
provenance: false
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ${{ matrix.BUILD_IMAGE_DOCKERFILE }}
build-args: COMMANDBOX_VERSION=${{ env.commandbox_version }}
platforms: ${{ env.arch_platforms }}
push: true
tags: ${{ env.IMAGE_TAG }}