Repository navigation
100 lines (92 loc) · 3.5 KB
/
Copy pathpublish_build.yaml
File metadata and controls
100 lines (92 loc) · 3.5 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
name: Publish Conductor OSS Server
on:
release:
types:
- released
- prereleased
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., v1.0.0)'
required: true
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
name: Build and Publish the server
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- name: Set up Zulu JDK 21
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '21'
- name: Cache Gradle packages
uses: actions/cache@v5
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set version
id: version
run: |
# Use inputs.version for workflow_dispatch, or ref_name for release events
VERSION="${{ github.event.inputs.version || github.ref_name }}"
# Strip the 'v' prefix if present
PUBLISH_VERSION="${VERSION#v}"
echo "version=$PUBLISH_VERSION" >> $GITHUB_OUTPUT
echo "RELEASE_VERSION=$PUBLISH_VERSION" >> $GITHUB_ENV
echo "Publishing version: $PUBLISH_VERSION"
- name: Build Server JAR
run: |
./gradlew :conductor-server:build -x test -x spotlessCheck -x shadowJar -x :conductor-os-persistence-v3:build \
-Pversion=${{ steps.version.outputs.version }}
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- name: Build ui-next and embed into server static resources
run: |
corepack enable
cd ui-next
pnpm install
NODE_OPTIONS=--max-old-space-size=4096 pnpm build
cd ..
mkdir -p server/src/main/resources/static
rm -rf server/src/main/resources/static/*
cp -r ui-next/dist/. server/src/main/resources/static/
- name: Stage artifacts for Docker build
run: |
mkdir -p docker/server/libs
cp server/build/libs/*boot*.jar docker/server/libs/conductor-server.jar
- name: Login to Docker Hub Container Registry
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build and push Server
uses: docker/build-push-action@v7
with:
context: .
file: docker/server/Dockerfile
platforms: linux/arm64,linux/amd64
push: true
build-args: |
PREBUILT=true
tags: |
conductoross/conductor:${{ env.RELEASE_VERSION }}
orkesio/orkes-conductor-community-standalone:${{ env.RELEASE_VERSION }}
orkesio/orkes-conductor-community:${{ env.RELEASE_VERSION }}
${{ (github.event_name == 'release' && !github.event.release.prerelease) && 'conductoross/conductor:latest' || '' }}
${{ (github.event_name == 'release' && !github.event.release.prerelease) && 'orkesio/orkes-conductor-community-standalone:latest' || '' }}
${{ (github.event_name == 'release' && !github.event.release.prerelease) && 'orkesio/orkes-conductor-community:latest' || '' }}