Skip to content

Docker

Docker #37

Workflow file for this run

name: Docker
on:
workflow_dispatch:
inputs:
keycloak_version:
description: Keycloak version
required: true
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- id: version
name: Get latest version
run: |
echo version=$(grep 'version =' build.gradle.kts | cut -d '=' -f 2 | cut -d '"' -f 2) >> $GITHUB_OUTPUT
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
build-args: |
keycloak_version=${{ github.event.inputs.keycloak_version }}
context: .
push: true
tags: gleroy/keycloak-bcrypt:${{ github.event.inputs.keycloak_version }}_${{ steps.version.outputs.version }},gleroy/keycloak-bcrypt:latest