aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-08-24 03:09:55 +0100
committerGravatar Joe Banks <[email protected]>2024-08-24 03:09:55 +0100
commit79df3eaf0bad9e9a5cdd00f91917bb505238afd9 (patch)
tree9d14b1917fdd526be7df2ffc113cd4e7fcf0776f /.github
parentFix missing import (diff)
Build and push docker image
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yaml40
1 files changed, 39 insertions, 1 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 3f38670..80220f0 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -18,6 +18,45 @@ jobs:
version: 9
- run: pnpm install
- run: pnpm run build-keycloak-theme
+
+
+ docker_build:
+ name: Build Docker image
+ runs-on: ubuntu-latest
+ if: ${{ github.event_name == 'push' }}
+ needs: test
+ env:
+ KEYCLOAK_VERSION: 25.0.4
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Login to Github Container Registry
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ github.token }}
+
+ # Build and push the container to the GitHub Container
+ # Repository. The container will be tagged as "latest"
+ # and with the short SHA of the commit.
+ - name: Build and push
+ uses: docker/build-push-action@v6
+ with:
+ context: .
+ file: ./Dockerfile
+ push: ${{ github.ref == 'refs/heads/main' }}
+ cache-from: type=registry,ref=ghcr.io/owl-corp/keycloak:latest
+ cache-to: type=inline
+ tags: |
+ ghcr.io/owl-corp/keycloak:latest
+ ghcr.io/owl-corp/keycloak:${{ env.KEYCLOAK_VERSION }}
+ build-args: |
+ KEYCLOAK_VERSION=${{ env.KEYCLOAK_VERSION }}
check_if_version_upgraded:
name: Check if version upgrade
@@ -35,7 +74,6 @@ jobs:
with:
action_name: is_package_json_version_upgraded
branch: ${{ github.head_ref || github.ref }}
-
create_github_release:
runs-on: ubuntu-latest
needs: check_if_version_upgraded