-
Notifications
You must be signed in to change notification settings - Fork 91
36 lines (31 loc) · 1 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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