Skip to content

Build Keycloak Image #61

Build Keycloak Image

Build Keycloak Image #61

Workflow file for this run

name: Build Keycloak Image
on:
workflow_dispatch:
inputs:
tag:
description: 'Image Tag'
required: true
env:
NODE_VERSION: 22
defaults:
run:
shell: bash
jobs:
build-image:
name: Build Custom Keycloak Image
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
attestations: write
packages: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: keycloak/themes/cryptomator/common/resources/package-lock.json
- name: Install Dependencies
working-directory: keycloak/themes/cryptomator/common/resources
run: npm install
- name: Build Theme
working-directory: keycloak/themes/cryptomator/common/resources
run: npm run build
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Login to GHCR
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Container Image
id: push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: keycloak
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/cryptomator/keycloak:${{ github.event.inputs.tag }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
with:
subject-name: ghcr.io/cryptomator/keycloak
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true