Skip to content

Update build_images.yaml #1

Update build_images.yaml

Update build_images.yaml #1

Workflow file for this run

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:
- 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 }}