-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (78 loc) · 3.08 KB
/
release.yaml
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
name: Release to Docker
on:
push:
branches:
- 'release/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Calculate version
id: spell
uses: actoaps/version-spell@v5
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: gradle
- name: Gradle Build
run: |
./gradlew clean build sonar -Dsonar.host.url=$SONAR_HOST -Dsonar.login=$SONAR_LOGIN -DversionOverride=$BUILD_ID
env:
SONAR_HOST: ${{ secrets.SONAR_HOST }}
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
BUILD_ID: ${{ steps.spell.outputs.version }}
- name: Release client to Maven Central
run: |
./gradlew publishToSonatype -DversionOverride=$BUILD_ID
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
BUILD_ID: ${{ steps.spell.outputs.version }}
- name: Close Staging Repository
run: |
./gradlew closeSonatypeStagingRepository --info
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
- name: Release Staging Repository
run: |
./gradlew releaseSonatypeStagingRepository --info
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
- name: Set up QEMU for multiarch builds
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build sso image and publish to Docker
uses: docker/build-push-action@v4
with:
cache-to: type=gha,mode=max
cache-from: type=gha
context: ./sso
platforms: linux/amd64,linux/arm64
push: true
tags: actoaps/fafnir-sso:${{ steps.spell.outputs.version }},actoaps/fafnir-sso:latest
- name: Build iam image and publish to Docker
uses: docker/build-push-action@v4
with:
cache-to: type=gha,mode=max
cache-from: type=gha
context: ./iam
platforms: linux/amd64,linux/arm64
push: true
tags: actoaps/fafnir-iam:${{ steps.spell.outputs.version }},actoaps/fafnir-iam:latest