-
Notifications
You must be signed in to change notification settings - Fork 5
60 lines (51 loc) · 1.9 KB
/
release.yml
File metadata and controls
60 lines (51 loc) · 1.9 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
name: activemq Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
jobs:
upload:
name: Upload Release files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Login streamnative docker hub
run: docker login -u="${{ secrets.DOCKER_USER }}" -p="${{ secrets.DOCKER_PASSWORD }}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set project version
run: |
project_version=${GITHUB_REF#refs/tags/v}
echo "set project_version: $project_version"
./scripts/set-project-version.sh $project_version
- name: build
run: |
version=`./scripts/get-version.sh`
mvn clean install -DskipTests
echo "::set-output name=nar-file::pulsar-io-activemq-${version}.nar"
echo "::set-output name=readme-file::pulsar-io-activemq.md"
- name: build and push docker image
uses: nick-fields/retry@v2
with:
max_attempts: 99
retry_wait_seconds: 60
timeout_minutes: 30
command: |
CONNECTOR_VERSION=`./scripts/get-version.sh`
PULSAR_VERSION=`mvn -q -Dexec.executable=echo -Dexec.args='${pulsar.version}' --non-recursive exec:exec 2>/dev/null`
REPO=`mvn -q -Dexec.executable=echo -Dexec.args='${project.artifactId}' --non-recursive exec:exec 2>/dev/null`
IMAGE_REPO=streamnative/${REPO}
docker buildx build \
--platform linux/amd64,linux/arm64 \
--build-arg PULSAR_VERSION="$PULSAR_VERSION" \
-t ${IMAGE_REPO}:${CONNECTOR_VERSION} \
-f ./image/Dockerfile \
--push \
./