From 05197c430bf85445b55a346350d51cb7dfddb46c Mon Sep 17 00:00:00 2001 From: Marek Goldmann Date: Fri, 26 Jan 2024 14:45:07 +0100 Subject: [PATCH] ci: build and push images to quay using rh actions --- .github/workflows/maven.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 577913682..74edcf5f7 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -50,11 +50,21 @@ jobs: with: name: dist-service path: service/target/quarkus-app - - name: Build and push - uses: docker/build-push-action@v5 + - name: Build Image + id: build-image + uses: redhat-actions/buildah-build@v2 with: - push: false - context: . - file: images/sbomer-service/Containerfile - # tags: ${{ steps.meta.outputs.tags }} - #labels: ${{ steps.meta.outputs.labels }} + image: sbomer-service + tags: latest ${{ github.sha }} + containerfiles: | + ./images/sbomer-service/Containerfile + + - name: Push to Quay + id: push-to-quay + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tags }} + registry: ${{ secrets.REGISTRY_ORG_STAGE }} + username: ${{ secrets.REGISTRY_USER_STAGE }} + password: ${{ secrets.REGISTRY_PASSWORD_STAGE }}