Skip to content

Commit

Permalink
Update build-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
carmithersh authored May 21, 2024
1 parent cf851c0 commit b18c28d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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 }}

Expand All @@ -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
Expand Down

0 comments on commit b18c28d

Please sign in to comment.