-
Notifications
You must be signed in to change notification settings - Fork 8
78 lines (61 loc) · 1.87 KB
/
keycloak.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Docker Image
# Controls when the action will run.
on:
# When a release is published
release:
types: [published]
# Push excluding tags and workflow changes
push:
branches:
- main
tags-ignore:
- '*.*'
paths-ignore:
- '**/*.md'
jobs:
image_keycloak:
env:
PLATFORM: linux/amd64,linux/arm64
runs-on: ubuntu-latest
steps:
- uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Set tags
run: |
if [ -z "$TAG" ]; then
echo "TAG=-t openremote/keycloak:develop" >> $GITHUB_ENV
else
echo "TAG=-t openremote/keycloak:latest -t openremote/keycloak:$TAG" >> $GITHUB_ENV
fi
env:
TAG: ${{ github.event.release.tag_name }}
- uses: actions/checkout@v2
- name: set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: grant execute permission for gradlew
run: chmod +x gradlew
- name: build with Gradle
run: ./gradlew installDist
- name: set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: install buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
install: true
- name: available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets._TEMP_DOCKERHUB_USER }}
password: ${{ secrets._TEMP_DOCKERHUB_PASSWORD }}
- name: build and push images
run: |
docker build --build-arg GIT_COMMIT=${{ github.sha }} --push --platform $PLATFORM $TAG .