Skip to content

Commit 7bf25d6

Browse files
authored
chore: Build custom keycloak image (#158)
It is necessary to have a keycloak container that is able to start as a service.
1 parent 278d28c commit 7bf25d6

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and Push Keycloak Service Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'tools/Dockerfile.keycloak' # Trigger build only when Dockerfile changes
9+
workflow_dispatch: # Allows manual trigger
10+
11+
jobs:
12+
build_and_push:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Log in to Docker Hub (or GHCR)
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: gtema
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Build and push Keycloak image
26+
uses: docker/build-push-action@v6
27+
with:
28+
context: .
29+
file: tools/keycloak.Dockerfile
30+
push: true
31+
tags: |
32+
ghcr.io/gtema/keycloak-ci-service:latest@26.2
33+
ghcr.io/gtema/keycloak-ci-service:${{ github.sha }}

tools/Dockerfile.keycloak

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM quay.io/keycloak/keycloak:26.2
2+
CMD ["start-dev"]

0 commit comments

Comments
 (0)