-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1b3e4d
commit 3b44af8
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM adorsys/keycloak-config-cli:5.10.0-22.0.4 | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# GitHub Action: Set Keycloak configuration | ||
|
||
Configures a Keycloak instance from an input configuration | ||
|
||
## Usage | ||
|
||
``` | ||
jobs: | ||
e2e-tests: | ||
services: | ||
auth-db: | ||
image: postgres:13 | ||
env: | ||
POSTGRES_DB: keycloak | ||
POSTGRES_USER: keycloak | ||
POSTGRES_PASSWORD: password | ||
auth: | ||
image: keycloak/keycloak:22.0.3 | ||
env: | ||
KC_DB_USER: keycloak | ||
KC_DB_PASSWORD: password | ||
KEYCLOAK_ADMIN: admin | ||
KEYCLOAK_ADMIN_PASSWORD: admin | ||
ports: | ||
- 8080:8080 | ||
steps: | ||
- name: Set Keycloak configuration | ||
uses: RosemanLabs/gha-set-keycloak-config@v1 | ||
with: | ||
keycloak-url: "localhost:8080" | ||
keycloak-user: "admin" | ||
keycloak-password: "admin" | ||
import-files: "/config/*" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "Set Keycloak configuration" | ||
description: "Configures a Keycloak instance from an input configuration" | ||
inputs: | ||
keycloak-url: | ||
description: "The URL of the Keycloak instance" | ||
required: true | ||
keycloak-user: | ||
description: "The user to use for authenticating with Keycloak" | ||
required: true | ||
keycloak-password: | ||
description: "The password to use for authenticating with Keycloak" | ||
required: true | ||
import-files: | ||
description: "A list of files to import into Keycloak" | ||
required: true | ||
runs: | ||
using: "docker" | ||
image: "Dockerfile" | ||
args: | ||
- "-KEYCLOAK_URL ${{ inputs.keycloak-url }}" | ||
- "-KEYCLOAK_USER ${{ inputs.keycloak-user }}" | ||
- "-KEYCLOAK_PASSWORD ${{ inputs.keycloak-password }}" | ||
- "-IMPORT_FILES ${{ inputs.import-files }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
java $JAVA_OPTS -jar /app/keycloak-config-cli.jar $0 $@ |