2022-12-14 15:12:23 +00:00
|
|
|
name: Build Keycloak
|
|
|
|
description: Builds Keycloak providing Maven repository with all artifacts
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
upload-m2-repo:
|
|
|
|
description: Upload Maven repository for org.keycloak artifacts
|
|
|
|
required: false
|
2023-07-26 10:35:21 +00:00
|
|
|
default: "true"
|
2022-12-14 15:12:23 +00:00
|
|
|
upload-dist:
|
|
|
|
description: Upload distribution
|
|
|
|
required: false
|
2023-07-26 10:35:21 +00:00
|
|
|
default: "false"
|
2022-12-14 15:12:23 +00:00
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- id: setup-java
|
|
|
|
name: Setup Java
|
2023-07-26 10:35:21 +00:00
|
|
|
uses: ./.github/actions/java-setup
|
2022-12-14 15:12:23 +00:00
|
|
|
|
|
|
|
- id: maven-cache
|
|
|
|
name: Maven cache
|
|
|
|
uses: ./.github/actions/maven-cache
|
2023-03-07 10:44:49 +00:00
|
|
|
with:
|
|
|
|
create-cache-if-it-doesnt-exist: true
|
2022-12-14 15:12:23 +00:00
|
|
|
|
2024-11-06 07:25:49 +00:00
|
|
|
- id: pnpm-store-cache
|
|
|
|
name: PNPM store cache
|
|
|
|
uses: ./.github/actions/pnpm-store-cache
|
2023-10-30 11:50:06 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
- id: build-keycloak
|
|
|
|
name: Build Keycloak
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-06-15 11:48:56 +00:00
|
|
|
# Ensure this plugin is built first to avoid warnings in the build
|
|
|
|
./mvnw install -Pdistribution -am -pl distribution/maven-plugins/licenses-processor
|
|
|
|
# By using "dependency:resolve", it will download all dependencies used in later stages for running the tests
|
2024-10-15 12:15:15 +00:00
|
|
|
./mvnw install dependency:resolve -V -e -DskipTests -DskipExamples -DexcludeGroupIds=org.keycloak -Dsilent=true -DcommitProtoLockChanges=true
|
2022-12-14 15:12:23 +00:00
|
|
|
|
|
|
|
- id: compress-keycloak-maven-repository
|
|
|
|
name: Compress Keycloak Maven artifacts
|
|
|
|
if: inputs.upload-m2-repo == 'true'
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
tar -C ~/ --use-compress-program zstd -cf m2-keycloak.tzts \
|
|
|
|
--exclude '*.tar.gz' \
|
|
|
|
.m2/repository/org/keycloak
|
|
|
|
|
|
|
|
- id: upload-keycloak-maven-repository
|
|
|
|
name: Upload Keycloak Maven artifacts
|
|
|
|
if: inputs.upload-m2-repo == 'true'
|
2024-04-15 15:14:00 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-12-14 15:12:23 +00:00
|
|
|
with:
|
|
|
|
name: m2-keycloak.tzts
|
|
|
|
path: m2-keycloak.tzts
|
|
|
|
retention-days: 1
|
|
|
|
|
|
|
|
- id: upload-keycloak-dist
|
|
|
|
name: Upload Keycloak dist
|
|
|
|
if: inputs.upload-dist == 'true'
|
2024-04-15 15:14:00 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-12-14 15:12:23 +00:00
|
|
|
with:
|
|
|
|
name: keycloak-dist
|
|
|
|
path: quarkus/dist/target/keycloak*.tar.gz
|
|
|
|
retention-days: 1
|