-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (46 loc) · 1.45 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
name: Testutils release
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
# Allow to rerun this for a tag to get updated UBI-images
jobs:
release_k8ssandra_testutils:
name: Release Docker Image
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
cache: 'gradle'
- name: Setup and execute Gradle 'build' task
uses: gradle/gradle-build-action@v2
with:
build-root-directory: pulsar-cdc-testutil/app/
gradle-version: 7.3
arguments: |
docker
--stacktrace
- name: Login to DockerHub
if: ${{ !env.ACT }}
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Set git parsed values
if: ${{ !env.ACT }}
id: vars
shell: bash
run: |
echo ::set-output name=sha_short::$(git rev-parse --short=8 ${{ github.sha }})
echo ::set-output name=tag_name::${GITHUB_REF#refs/tags/}
echo "TARGET_VERSION=$(echo ${GITHUB_REF#refs/tags/} | awk '{print substr($0,2)}')" >> $GITHUB_ENV
- name: Push testutils
shell: bash
run: |
docker push k8ssandra/testutils:${{ steps.vars.outputs.tag_name }}