Skip to content

Commit

Permalink
add workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
raspreet-vunet committed Sep 20, 2024
1 parent ecd0400 commit af38607
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/actions/build-keycloak/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build Keycloak
description: Builds Keycloak providing Maven repository with all artifacts

runs:
using: composite
steps:
- id: setup-java
name: Setup Java
uses: ./.github/actions/java-setup

- id: maven-cache
name: Maven cache
uses: ./.github/actions/maven-cache
with:
create-cache-if-it-doesnt-exist: true

- id: phantomjs-cache
name: PhantomJS cache
uses: ./.github/actions/phantomjs-cache

- id: frontend-plugin-cache
name: Frontend Plugin Cache
uses: ./.github/actions/frontend-plugin-cache

# Remove once https://github.com/keycloak/keycloak/issues/19299 is solved
########################################################################################################
- id: check-adapter-changes
if: github.event_name == 'pull_request'
name: Check changes for WildFly adapters
shell: bash
# If there are no changes for WildFly adapters, we use adapters built in the latest nightly build
run: |
WF_ADAPTERS_REGEX="^adapters/oidc/wildfly|^adapters/saml/wildfly"
git fetch origin --tags --force
echo "GIT_WF_ADAPTERS_DIFF=$(git diff origin/main --name-only | egrep -ic -e "$WF_ADAPTERS_REGEX")" >> $GITHUB_ENV
echo "NIGHTLY_DIFF=$(git diff nightly --name-only | egrep -ic -e "$WF_ADAPTERS_REGEX")" >> $GITHUB_ENV
- id: set-maven-profile
if: ${{ github.event_name != 'pull_request' || env.GIT_WF_ADAPTERS_DIFF != 0 || env.NIGHTLY_DIFF != 0}}
name: Set profile for building distribution
shell: bash
run: |
echo "MVN_PROFILES=-Pdistribution" >> $GITHUB_ENV
echo "WildFly adapters will be built in our codebase"
########################################################################################################
- id: build-keycloak
name: Build Keycloak
shell: bash
# By using "dependency:resolve", it will download all dependencies used in later stages for running the tests
run: |
./mvnw install dependency:resolve -V -e -DskipTests -DskipExamples ${{ env.MVN_PROFILES}}

0 comments on commit af38607

Please sign in to comment.