2022-03-15 07:58:44 +00:00
|
|
|
name: Release Keycloak container
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '[0-9]+.[0-9]+.[0-9]+'
|
|
|
|
concurrency: keycloak-container-release
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
if: github.repository == 'keycloak/keycloak'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-28 15:51:51 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-03-15 07:58:44 +00:00
|
|
|
|
|
|
|
- name: Set up QEMU
|
2022-05-12 12:53:59 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-03-15 07:58:44 +00:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
2022-05-12 12:53:59 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2022-05-13 18:47:19 +00:00
|
|
|
|
|
|
|
- name: Login to Quay
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: quay.io
|
|
|
|
username: ${{ secrets.QUAY_USERNAME }}
|
|
|
|
password: ${{ secrets.QUAY_TOKEN }}
|
|
|
|
|
|
|
|
- name: Login to Docker
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
|
2022-03-15 07:58:44 +00:00
|
|
|
- name: Container metadata
|
|
|
|
id: meta
|
2022-05-12 12:53:59 +00:00
|
|
|
uses: docker/metadata-action@v4
|
2022-03-15 07:58:44 +00:00
|
|
|
with:
|
2022-05-13 18:47:19 +00:00
|
|
|
images: |
|
|
|
|
keycloak/keycloak
|
|
|
|
quay.io/keycloak/keycloak
|
2022-03-15 07:58:44 +00:00
|
|
|
tags: |
|
|
|
|
type=ref,event=branch
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
|
2022-05-13 18:47:19 +00:00
|
|
|
- name: Build and push the image
|
2022-05-12 12:53:59 +00:00
|
|
|
uses: docker/build-push-action@v3
|
2022-03-15 07:58:44 +00:00
|
|
|
with:
|
|
|
|
context: quarkus/container
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|