Aligning the JS build and caching with the main build (#31846)

Closes #31845

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Alexander Schwartz 2024-08-13 09:05:29 +02:00 committed by GitHub
parent d17a48f8f8
commit 653f67768e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 25 deletions

View file

@ -7,11 +7,6 @@ inputs:
required: false
default: "20"
working-directory:
description: The working directory where the `pnpm-lock.yaml` file is located.
required: false
default: ""
runs:
using: composite
steps:
@ -38,11 +33,13 @@ runs:
path: |
~/.cache/Cypress
${{ steps.pnpm-cache.outputs.store-path }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('${{ inputs.working-directory }}/pnpm-lock.yaml') }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: ${{ inputs.working-directory }}
shell: bash
run: pnpm install --prefer-offline --frozen-lockfile
# Run the store prune after the installation to avoid having caches which grow over time
run: |
pnpm install --prefer-offline --frozen-lockfile
pnpm store prune

View file

@ -43,17 +43,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
check-latest: true
cache: maven
- name: Build Keycloak
uses: ./.github/actions/build-keycloak
- name: Prepare archive for upload
run: |
./mvnw clean install --errors -DskipTests -DskipTestsuite -DskipExamples -Pdistribution
mv ./quarkus/dist/target/keycloak-999.0.0-SNAPSHOT.tar.gz ./keycloak-999.0.0-SNAPSHOT.tar.gz
- name: Upload Keycloak dist
@ -164,10 +158,7 @@ jobs:
name: keycloak
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
uses: ./.github/actions/java-setup
- name: Start Keycloak server
run: |
@ -258,10 +249,7 @@ jobs:
name: keycloak
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
uses: ./.github/actions/java-setup
- name: Start Keycloak server
run: |