You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2022/10/14 00:12:03 UTC

[camel-karavan] 02/02: Fix build and push operator workflow

This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git

commit e4d7d4613fa820d395eae7c1f717e1cd0ec6d6cf
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Thu Oct 13 20:11:53 2022 -0400

    Fix build and push operator workflow
---
 .github/workflows/operator.yml | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/operator.yml b/.github/workflows/operator.yml
index 511fc44..433dc9c 100644
--- a/.github/workflows/operator.yml
+++ b/.github/workflows/operator.yml
@@ -8,6 +8,9 @@ on:
     branches: [ main ]
 
 env:
+  REGISTRY: ghcr.io
+  IMAGE_NAME: ${{ github.repository }}-operator
+  IMAGE_NAME_BUNDLE: ${{ github.repository }}-bundle
   TAG: 3.18.5
 
 jobs:
@@ -40,7 +43,7 @@ jobs:
           mvn package -f karavan-operator -DskipTest \
           -Dquarkus.container-image.build=true \
           -Dquarkus.container-image.push=true \
-          -Dquarkus.container-image.image=ghcr.io/${GITHUB_REPOSITORY}-operator:${{ env.TAG }} \
+          -Dquarkus.container-image.image=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} \
           -Dquarkus.container-image.username=${{ github.actor }} \
           -Dquarkus.container-image.password=${{ secrets.GITHUB_TOKEN }}
         if: ${{ github.ref == 'refs/heads/main' }}
@@ -48,8 +51,8 @@ jobs:
       #  Build the Operator Bundle image
       - name: Build operator Bundle image
         run: |
-          MY_BUNDLE_IMAGE=ghcr.io/${GITHUB_REPOSITORY}-bundle:${{ env.TAG }}
-          docker login -u=${{ github.actor }} -p=${{ secrets.GITHUB_TOKEN }}
+          MY_BUNDLE_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_BUNDLE }}:${{ env.TAG }}
+          docker login -u=${{ github.actor }} -p=${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
           docker build -t $MY_BUNDLE_IMAGE -f target/bundle/bundle.Dockerfile target/bundle
           docker push $MY_BUNDLE_IMAGE
         if: ${{ github.ref == 'refs/heads/main' }}
\ No newline at end of file