From 73a3c61a5790cd47367f74bc82f60abc0bd7c942 Mon Sep 17 00:00:00 2001 From: Roman Plevka Date: Thu, 14 Nov 2024 16:45:47 +0100 Subject: [PATCH] add a basic GH workflow to build and push container on merge --- .github/workflows/build_publish_image.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build_publish_image.yaml diff --git a/.github/workflows/build_publish_image.yaml b/.github/workflows/build_publish_image.yaml new file mode 100644 index 0000000..052b3c7 --- /dev/null +++ b/.github/workflows/build_publish_image.yaml @@ -0,0 +1,40 @@ +# Update rekuper image on quay. +name: update_rekuper_image + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + rekuper_container: + name: Update rekuper container image on Quay. + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + # do not store the auth token in git config + persist-credentials: false + + - name: Build rekuper image + id: build-image + uses: redhat-actions/buildah-build@v2 + with: + image: rekuper + tags: + - latest + containerfiles: | + ./Containerfile + + - name: Push rekuper image to quay.io + id: push-to-quay + uses: redhat-actions/push-to-registry@v2 + with: + image: rekuper + tags: ${{ steps.image_tag.outputs.IMAGE_TAG }} + registry: ${{ secrets.QUAY_SERVER }}/${{ secrets.QUAY_NAMESPACE }} + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }}