Publish container images on Docker Hub
Resolves #11986 Co-authored-by: andreaTP <andrea.peruffo1982@gmail.com>
This commit is contained in:
parent
9fc6114ccd
commit
58956aa0b4
2 changed files with 47 additions and 30 deletions
30
.github/workflows/release-container.yml
vendored
30
.github/workflows/release-container.yml
vendored
|
@ -20,16 +20,6 @@
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Container metadata
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v4
|
|
||||||
with:
|
|
||||||
images: quay.io/keycloak/keycloak
|
|
||||||
tags: |
|
|
||||||
type=ref,event=branch
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
|
|
||||||
- name: Login to Quay
|
- name: Login to Quay
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -37,7 +27,25 @@
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
username: ${{ secrets.QUAY_USERNAME }}
|
||||||
password: ${{ secrets.QUAY_TOKEN }}
|
password: ${{ secrets.QUAY_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Login to Docker
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
|
- name: Container metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
keycloak/keycloak
|
||||||
|
quay.io/keycloak/keycloak
|
||||||
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
|
||||||
|
- name: Build and push the image
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: quarkus/container
|
context: quarkus/container
|
||||||
|
|
45
.github/workflows/release-operator-container.yml
vendored
45
.github/workflows/release-operator-container.yml
vendored
|
@ -18,23 +18,6 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Container metadata
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v4
|
|
||||||
with:
|
|
||||||
images: quay.io/keycloak/keycloak-operator
|
|
||||||
tags: |
|
|
||||||
type=ref,event=branch
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
|
|
||||||
- name: Login to Quay
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_TOKEN }}
|
|
||||||
|
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
|
@ -45,7 +28,33 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mvn -P operator -pl operator -am clean install -DskipTests
|
mvn -P operator -pl operator -am clean install -DskipTests
|
||||||
|
|
||||||
- name: Build the operator Docker image
|
- 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 }}
|
||||||
|
logout: true
|
||||||
|
|
||||||
|
- name: Container metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
keycloak/keycloak-operator
|
||||||
|
quay.io/keycloak/keycloak-operator
|
||||||
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
|
||||||
|
- name: Build and push the operator image
|
||||||
working-directory: operator
|
working-directory: operator
|
||||||
run: |
|
run: |
|
||||||
echo "${{ steps.meta.outputs.tags }}" | xargs -I {} \
|
echo "${{ steps.meta.outputs.tags }}" | xargs -I {} \
|
||||||
|
|
Loading…
Reference in a new issue