Skip to content

Commit

Permalink
chore(keycloakify): Use .nvmrc in dockerfile, bump keycloak orcid v…
Browse files Browse the repository at this point in the history
…ersion
  • Loading branch information
corneliusroemer committed May 10, 2024
1 parent 728e7df commit 7f2789e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/keycloakify-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
echo "CACHE_HIT=$EXISTS" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get node version build arg
if: env.CACHE_HIT == 'false'
run: |
NODE_VERSION=$(cat website/.nvmrc | tr -cd [:digit:].)
echo "NODE_VERSION=$NODE_VERSION" >> $GITHUB_ENV
- name: Build and push image
if: env.CACHE_HIT == 'false'
uses: docker/build-push-action@v5
Expand All @@ -67,6 +72,7 @@ jobs:
cache-from: type=gha,scope=keycloakify-${{ github.ref }}
cache-to: type=gha,mode=max,scope=keycloakify-${{ github.ref }}
platforms: ${{ env.BUILD_ARM && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
build-args: NODE_VERSION=${{ env.NODE_VERSION }}
- name: Tag and push image if cache hit
if: env.CACHE_HIT == 'true'
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Get node version build arg
if: env.CACHE_HIT == 'false'
run: |
NODE_VERSION=$(cat website/.nvmrc | tr -cd [:digit:].)
echo "NODE_VERSION=$NODE_VERSION" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions keycloak/keycloakify/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22
6 changes: 4 additions & 2 deletions keycloak/keycloakify/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM node:21-bookworm as builder
ARG KEYCLOAK_ORCID_VERSION=1.3.0
ARG NODE_VERSION=22
FROM node:${NODE_VERSION}-bookworm as builder

USER root
RUN apt-get update && apt-get install -y maven
Expand All @@ -17,6 +19,6 @@ FROM alpine:3.19
RUN mkdir /output
COPY --from=builder /app/build_keycloak/target/*.jar /output/
RUN apk add --no-cache wget curl
RUN wget -P /output https://github.com/eosc-kc/keycloak-orcid/releases/download/1.2.0/keycloak-orcid-1.2.0.jar
RUN wget -P /output https://github.com/eosc-kc/keycloak-orcid/releases/download/${NODE_VERSION}/keycloak-orcid-${NODE_VERSION}.jar
RUN ls -l /output
CMD sh -c 'cp /output/*.jar /destination/'

0 comments on commit 7f2789e

Please sign in to comment.