-
Notifications
You must be signed in to change notification settings - Fork 2.4k
48 lines (44 loc) · 1.55 KB
/
publish-dockerhub.yml
File metadata and controls
48 lines (44 loc) · 1.55 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
name: Fineract Publish to DockerHub
on:
push:
branches:
- develop
tags:
- 1.*
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
steps:
- name: Checkout Source Code
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5
with:
java-version: '21'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # v5.0.1
- name: Get Git Hashes
run: |
echo "short_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "long_hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
id: git_hashes
- name: Build the Apache Fineract image
run: |
TAGS=${{ github.ref_name }}
if [ "${{ github.ref_name }}" == "develop" ]; then
TAGS="$TAGS,${{ steps.git_hashes.outputs.short_hash }},${{ steps.git_hashes.outputs.long_hash }}"
fi
./gradlew --no-daemon --console=plain :fineract-provider:jib -x test -x cucumber \
-Djib.to.auth.username=${{secrets.DOCKERHUB_USER}} \
-Djib.to.auth.password=${{secrets.DOCKERHUB_TOKEN}} \
-Djib.from.platforms=linux/amd64,linux/arm64 \
-Djib.to.image=apache/fineract \
-Djib.to.tags=$TAGS