From f99d10d7b4e28f5ee910f467f98cd003c23b3052 Mon Sep 17 00:00:00 2001 From: Timam Date: Tue, 3 Oct 2023 02:20:17 +0600 Subject: [PATCH] using composite workflow --- .github/workflows/quay.yaml | 60 ---------------------------------- .github/workflows/release.yaml | 42 ++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/quay.yaml create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/quay.yaml b/.github/workflows/quay.yaml deleted file mode 100644 index 8237913..0000000 --- a/.github/workflows/quay.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Build and Push Image to quay.io - -on: - push: - tags: - - 'v*' - -jobs: - build: - name: Build and push image - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - platform: - - linux/386 - - linux/amd64 - - linux/arm/v6 - - linux/arm/v7 - - linux/arm64/v8 - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Build watcher image - id: build-watcher-image - uses: redhat-actions/buildah-build@v2 - with: - image: watcher - tags: latest ${{ github.ref_name }} - containerfiles: svc/watcher/Dockerfile - - - name: Build genie image - id: build-genie-image - uses: redhat-actions/buildah-build@v2 - with: - image: genie - tags: latest ${{ github.ref_name }} - containerfiles: svc/genie/Dockerfile - - - name: Push watcher image to quay.io - id: push-watcher-image - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build-watcher-image.outputs.image }} - tags: ${{ steps.build-watcher-image.outputs.tags }} - registry: ${{ vars.QUAY_REGISTRY }} - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - - name: Push genie image to quay.io - id: push-genie-image - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build-genie-image.outputs.image }} - tags: ${{ steps.build-genie-image.outputs.tags }} - registry: ${{ vars.QUAY_REGISTRY }} - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..52f4c84 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,42 @@ +name: publish docker image to quay.io + +on: + push: + tags: + - 'v*' + +jobs: + build: + name: Build and push image + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/386 + - linux/amd64 + - linux/arm/v6 + - linux/arm/v7 + - linux/arm64/v8 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: build and push watcher docker image to quay.io + uses: statuzproj/actions/quay-multi-arch@main + with: + service_name: watcher + tag: ${{ github.ref_name }} + quay_registry: ${{ vars.QUAY_REGISTRY }} + quay_username: ${{ secrets.QUAY_USERNAME }} + quay_password: ${{ secrets.QUAY_PASSWORD }} + + - name: build and push genie docker image to quay.io + uses: statuzproj/actions/quay-multi-arch@main + with: + service_name: genie + tag: ${{ github.ref_name }} + quay_registry: ${{ vars.QUAY_REGISTRY }} + quay_username: ${{ secrets.QUAY_USERNAME }} + quay_password: ${{ secrets.QUAY_PASSWORD }}