From b18c28de7ce5905110effee9ec1ed215d31b915e Mon Sep 17 00:00:00 2001 From: carmit hershman <78722358+carmithersh@users.noreply.github.com> Date: Tue, 21 May 2024 17:32:37 +0300 Subject: [PATCH] Update build-publish.yml --- .github/workflows/build-publish.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 1cfc274..38c29da 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -15,9 +15,9 @@ jobs: DOCKER_REPO: 'docker-local' IMAGE_NAME: 'github-jfrog-example:2' JF_PROJECT: backoffice-proj - JF_URL: https://${{ vars.JF_URL }}/ + JF_URL: https://${{ secrets.JF_URL }}/ outputs: - image: ${{ vars.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }} + image: ${{ secrets.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }} digest: ${{ steps.build.outputs.digest }} steps: # Setup Go @@ -42,7 +42,7 @@ jobs: name: Setup JFrog CLI id: setup-cli env: - JF_URL: https://${{ vars.JF_URL }}/ + JF_URL: https://${{ secrets.JF_URL }}/ with: oidc-provider-name: jfrog-github-oidc @@ -81,7 +81,7 @@ jobs: - name: Authenticate Docker uses: docker/login-action@v3 with: - registry: ${{ vars.JF_URL }} + registry: ${{ secrets.JF_URL }} username: ${{ steps.setup-cli.outputs.oidc-user }} password: ${{ steps.setup-cli.outputs.oidc-token }} @@ -92,17 +92,17 @@ jobs: with: push: true platforms: linux/amd64 #, linux/arm64 - tags: ${{ vars.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }} + tags: ${{ secrets.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }} - name: docker scan run: | - /tmp/jfrog-cli docker pull ${{ vars.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }} - /tmp/jfrog-cli docker scan ${{ vars.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }} + /tmp/jfrog-cli docker pull ${{ secrets.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }} + /tmp/jfrog-cli docker scan ${{ secrets.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }} - name: add docker package to build run: | - echo "${{ vars.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }}@${{ steps.build.outputs.digest }}" > metadata.json + echo "${{ secrets.JF_URL }}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }}@${{ steps.build.outputs.digest }}" > metadata.json /tmp/jfrog-cli rt build-docker-create ${{ env.DOCKER_REPO }} --image-file metadata.json - name: publish build info