Skip to content

Commit

Permalink
Auto-push of nginx-keycloak's Docker image on main (#9)
Browse files Browse the repository at this point in the history
* Auto push of the docker build

* Pushing only on main

* Pushing only on main
  • Loading branch information
flavienbwk authored Sep 21, 2024
1 parent d57d538 commit 52c5903
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 19 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker build of nginx-keycloak

on: [push]

jobs:

docker-build:
name: Ubuntu 22.04 build of nginx-keycloak
runs-on: ubuntu-22.04

steps:

- name: Check Out Repo
uses: actions/checkout@v2

- name: Docker-compose build
run: |
docker compose build
- name: Log in to GitHub Container Registry
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push nginx image to GitHub Container Registry
if: github.ref == 'refs/heads/main'
run: |
docker push ghcr.io/flavienbwk/nginx-keycloak/nginx-sso:$(grep -oP "(?<=image: ghcr.io/flavienbwk/nginx-keycloak/nginx-sso:).*" docker-compose.yml)
18 changes: 0 additions & 18 deletions .github/workflows/linux-build.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nginx Keycloak

[![Docker build](https://github.com/flavienbwk/nginx-keycloak/actions/workflows/linux-build.yml/badge.svg)](https://github.com/flavienbwk/nginx-keycloak/actions/workflows/linux-build.yml)
[![Docker build](https://github.com/flavienbwk/nginx-keycloak/actions/workflows/docker-build.yml/badge.svg)](https://github.com/flavienbwk/nginx-keycloak/actions/workflows/docker-build.yml)
[![Test](https://github.com/flavienbwk/nginx-keycloak/actions/workflows/test-keycloak-setup.yml/badge.svg)](https://github.com/flavienbwk/nginx-keycloak/actions/workflows/test-keycloak-setup.yml)

Setting NGINX as a reverse proxy with Keycloak SSO in front of your web applications.
Expand Down

0 comments on commit 52c5903

Please sign in to comment.