Skip to content

Commit e82dafc

Browse files
committed
chore(ci): modify publish docker to align on EE
1 parent 78066fe commit e82dafc

File tree

2 files changed

+37
-5
lines changed

2 files changed

+37
-5
lines changed

Diff for: .github/workflows/workflow-publish-docker.yml

+36-5
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,23 @@ on:
88
default: 'LATEST'
99
required: false
1010
type: string
11+
force-download-artifact:
12+
description: 'Force download artifact'
13+
required: false
14+
type: string
15+
default: "true"
1116
workflow_call:
1217
inputs:
1318
plugin-version:
1419
description: "Kestra version"
1520
default: 'LATEST'
1621
required: false
1722
type: string
23+
force-download-artifact:
24+
description: 'Force download artifact'
25+
required: false
26+
type: string
27+
default: "true"
1828
secrets:
1929
DOCKERHUB_USERNAME:
2030
description: "The Dockerhub username."
@@ -24,18 +34,32 @@ on:
2434
required: true
2535

2636
jobs:
27-
37+
# ********************************************************************************************************************
38+
# Build
39+
# ********************************************************************************************************************
40+
build-artifacts:
41+
name: Build Artifacts
42+
if: ${{ github.event.inputs.force-download-artifact == 'true' }}
43+
uses: ./.github/workflows/workflow-build-artifacts.yml
44+
# ********************************************************************************************************************
45+
# Docker
46+
# ********************************************************************************************************************
2847
publish:
2948
name: Publish - Docker
3049
runs-on: ubuntu-latest
50+
needs: build-artifacts
51+
if: |
52+
always() &&
53+
(needs.build-artifacts.result == 'success' ||
54+
github.event.inputs.force-download-artifact != 'true')
3155
strategy:
3256
matrix:
3357
image:
34-
- tag: ${{ needs.build-artifacts.outputs.docker-tag }}-no-plugins
58+
- tag: -no-plugins
3559
packages: jattach
3660
python-libraries: ""
3761

38-
- tag: ${{ needs.build-artifacts.outputs.docker-tag }}
62+
- tag: ""
3963
plugins: ${{ needs.build-artifacts.outputs.plugins }}
4064
packages: python3 python3-venv python-is-python3 python3-pip nodejs npm curl zip unzip jattach
4165
python-libraries: kestra
@@ -68,11 +92,18 @@ jobs:
6892
id: vars
6993
run: |
7094
TAG=${GITHUB_REF#refs/*/}
71-
if [[ $TAG = "master" || $TAG == v* ]]; then
95+
if [[ $TAG == v* ]]; then
96+
TAG="${TAG}";
7297
echo "plugins=${{ matrix.image.plugins }}" >> $GITHUB_OUTPUT
98+
elif [[ $TAG = "develop" ]]; then
99+
TAG="develop";
100+
echo "plugins=--repositories=https://s01.oss.sonatype.org/content/repositories/snapshots ${{ matrix.image.plugins }}" >> $GITHUB_OUTPUT
73101
else
102+
TAG="build-${{ github.run_id }}";
74103
echo "plugins=--repositories=https://s01.oss.sonatype.org/content/repositories/snapshots ${{ matrix.image.plugins }}" >> $GITHUB_OUTPUT
75104
fi
105+
106+
echo "tag=${TAG}${{ matrix.image.tag }}" >> $GITHUB_OUTPUT
76107
77108
# Build Docker Image
78109
- name: Artifacts - Download executable
@@ -92,7 +123,7 @@ jobs:
92123
with:
93124
context: .
94125
push: true
95-
tags: kestra/kestra:${{ matrix.image.tag }}
126+
tags: kestra/kestra:${{ steps.vars.outputs.tag }}
96127
platforms: linux/amd64,linux/arm64
97128
build-args: |
98129
KESTRA_PLUGINS=${{ steps.vars.outputs.plugins }}

Diff for: .github/workflows/workflow-release.yml

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
uses: ./.github/workflows/workflow-publish-docker.yml
5656
if: startsWith(github.ref, 'refs/heads/develop') || github.event.inputs.publish-docker == 'true'
5757
with:
58+
force-download-artifact: 'false'
5859
plugin-version: ${{ github.event.inputs.plugin-version != null && github.event.inputs.plugin-version || 'LATEST' }}
5960
secrets:
6061
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}

0 commit comments

Comments
 (0)