Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Commit 70b0bd9

Browse files
andreaTPstianst
authored andcommitted
GH Action to release the container image
1 parent 6bcdc0d commit 70b0bd9

File tree

2 files changed

+48
-36
lines changed

2 files changed

+48
-36
lines changed

.github/workflows/container.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release Keycloak Operator container
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '[0-9]+.[0-9]+.[0-9]+'
8+
concurrency: keycloak-operator-container-release
9+
10+
jobs:
11+
publish:
12+
if: github.repository == 'keycloak/keycloak-operator'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v1
20+
21+
- name: Container metadata
22+
id: meta
23+
uses: docker/metadata-action@v3
24+
with:
25+
images: quay.io/keycloak/keycloak-operator
26+
flavor: |
27+
latest=false
28+
tags: |
29+
type=ref,event=branch
30+
type=raw,value=legacy
31+
type=semver,pattern={{version}}-legacy
32+
type=semver,pattern={{major}}.{{minor}}-legacy
33+
34+
- name: Login to Quay
35+
uses: docker/login-action@v1
36+
with:
37+
registry: quay.io
38+
username: ${{ secrets.QUAY_USERNAME }}
39+
password: ${{ secrets.QUAY_PASSWORD }}
40+
41+
- name: Build and push
42+
uses: docker/build-push-action@v2
43+
with:
44+
context: .
45+
platforms: linux/amd64
46+
push: ${{ github.event_name != 'pull_request' }}
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)