Skip to content

Commit f32efce

Browse files
authored
Update build-and-deploy.yml
1 parent c9fba4f commit f32efce

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
echo '🔎 Evidence attached: integration-test 🧪 ' >> $GITHUB_STEP_SUMMARY
151151
152152
Attestation-check-to-promote:
153-
needs: Docker-build-with-evidence
153+
needs: docker-build-with-evidence
154154
runs-on: ubuntu-latest
155155
env:
156156
REPO_NAME: evidence-demo-docker-dev
@@ -166,14 +166,20 @@ jobs:
166166
registry: ${{ vars.ARTIFACTORY_URL }}
167167
username: ${{ secrets.JF_USER }}
168168
password: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
169-
- name: Validate the attestation and the artifact
169+
- name: prepare data for validation step
170+
id: prepare-input
170171
env:
171172
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172-
IMG_NAME: ${{ needs.docker-build-with-evidence.outputs.image_name }}
173173
run: |
174174
URL=$(echo ${{ vars.ARTIFACTORY_URL }} | sed 's|^https://||')
175-
REPO_URL=${URL}/${REPO_NAME}
176-
gh attestation verify --owner guybar oci://$REPO_URL/$IMG_NAME --bundle-from-oci
175+
echo "repo-url=${URL}/${REPO_NAME}" >> $GITHUB_OUTPUT
176+
- name: Validate the attestation and the artifact
177+
id: verify-attestation
178+
env:
179+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180+
IMG_NAME: ${{ needs.docker-build-with-evidence.outputs.image_name }}
181+
run: |
182+
gh attestation verify --owner guybar oci://${{ steps.prepare-input.outputs.repo-url }}/$IMG_NAME --bundle-from-oci --format json
177183
Policy-check-and-promote-to-prod:
178184
needs: Promote-to-qa-and-test
179185
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)