Browse Source

fix: publish workflow (#4672)

Signed-off-by: Gustavo Carvalho <gustavo@externalsecrets.com>
Gustavo Fernandes de Carvalho 1 year ago
parent
commit
2d8d8f7e04
1 changed files with 5 additions and 4 deletions
  1. 5 4
      .github/workflows/publish.yml

+ 5 - 4
.github/workflows/publish.yml

@@ -42,6 +42,7 @@ env:
   TAG_SUFFIX: ${{ inputs.tag-suffix }}
   ARCH: ${{ inputs.build-arch }}
   DOCKERFILE: ${{ inputs.dockerfile }}
+  IS_FORK: ${{ secrets.IS_FORK }}
 
 jobs:
   build-publish:
@@ -87,7 +88,7 @@ jobs:
 
       - name: Login to Docker
         uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
-        if: secrets.IS_FORK != ''
+        if: env.IS_FORK != ''
         with:
           registry: ghcr.io
           username: ${{ inputs.username }}
@@ -112,7 +113,7 @@ jobs:
           echo "image-tag=${TAG}" >> $GITHUB_OUTPUT
 
       - name: Build & Publish Artifacts
-        if: secrets.IS_FORK != ''
+        if: env.IS_FORK != ''
         shell: bash
         env:
           IMAGE_TAG: ${{ steps.container_info.outputs.image-tag }}
@@ -123,7 +124,7 @@ jobs:
         run: make docker.build
 
       - name: Build & Publish Artifacts fork
-        if: secrets.IS_FORK == ''
+        if: env.IS_FORK == ''
         shell: bash
         env:
           IMAGE_TAG: ${{ steps.container_info.outputs.image-tag }}
@@ -152,7 +153,7 @@ jobs:
       - name: Checkout
         uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
       - name: Sign image
-        if: secrets.IS_FORK != ''
+        if: env.IS_FORK != ''
         uses: ./.github/actions/sign
         with:
           image-name: ${{ inputs.image-name }}