-
Notifications
You must be signed in to change notification settings - Fork 845
34 lines (32 loc) · 1.1 KB
/
docker-image.yml
File metadata and controls
34 lines (32 loc) · 1.1 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
name: Docker Image CI
on:
workflow_dispatch:
push:
tags:
- 'v78.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Java
uses: actions/setup-java@v5
with:
distribution: 'liberica'
java-version: '21'
cache: 'gradle'
- name: Login to Docker Hub
uses: docker/login-action@v4
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the Docker image
run: |
echo running on branch ${GITHUB_REF##*/}
if [ "${GITHUB_REF##*/}" == "develop" ]; then
export BP_JVM_TYPE=JDK && ./gradlew --no-daemon --max-workers 1 bootBuildImage --imageName docker.io/cfidentity/uaa:${{ github.run_number }} --publishImage
else
export BP_JVM_TYPE=JDK && ./gradlew --no-daemon --max-workers 1 -Pversion=${GITHUB_REF##*/} bootBuildImage --imageName docker.io/cfidentity/uaa:${GITHUB_REF##*/} --publishImage
fi