Skip to content

split up Close & Release Staging Repository into 2 #144

split up Close & Release Staging Repository into 2

split up Close & Release Staging Repository into 2 #144

Workflow file for this run

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