forked from chenhunghan/keycloak
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (82 loc) · 1.91 KB
/
build_images.yaml
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
79
80
81
82
83
84
name: Build and Push Image to Github Container Registry
on:
push:
branches:
- main
paths:
- 'Dockerfile'
- '.github/workflows/build_images.yaml'
env:
REGISTRY: ghcr.io
IMAGE_NAME: keycloak
jobs:
image_to_gcr:
strategy:
matrix:
keycloak_version:
- 26.0.6
- 25.0.6
- 25.0.0
- 24.0.5
- 23.0.7
- 23.0.6
- 23.0.5
- 23.0.4
- 23.0.3
- 23.0.2
- 23.0.1
- 23.0.0
- 22.0.5
- 22.0.4
- 22.0.3
- 22.0.2
- 22.0.1
- 22.0.0
- 21.1.2
- 21.1.1
- 21.1.0
- 21.0.2
- 21.0.1
- 21.0.0
- 19.0.0
- 18.0.0
- 17.0.0
- 16.1.0
- 16.0.0
- 15.1.0
- 15.0.1
- 15.0.0
- 14.0.0
- 13.0.0
- 12.0.0
- 11.0.0
- 10.0.0
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
build-args: |
"KEYCLOAK_VERSION=${{ matrix.keycloak_version }}"
tags: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ matrix.keycloak_version }}
labels: ${{ steps.meta.outputs.labels }}