Skip to content

Commit 30ebcbe

Browse files
committed
adding external image mirroring step to the workflow
1 parent 1f97ece commit 30ebcbe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/build-images.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,20 @@ jobs:
405405
trivy-container-${{ matrix.service }}.sarif
406406
retention-days: 30
407407

408+
- name: Trigger external image mirror
409+
if: steps.changes.outputs.needs_build == 'true'
410+
run: |
411+
curl -X POST \
412+
-H "Authorization: token ${{ secrets.GH_TOKEN_MIRROR_TO_ICR }}" \
413+
-H "Accept: application/vnd.github.v3+json" \
414+
https://api.github.com/repos/ibm-skills-network/security-compliance-automation/actions/workflows/build-external-images.yml/dispatches \
415+
-d '{
416+
"ref": "main",
417+
"inputs": {
418+
"image": "ghcr.io/${{ github.repository }}/mark-${{ matrix.service }}:${{ env.IMAGE_TAG }}"
419+
}
420+
}'
421+
408422
- name: Generate security summary
409423
if: always() && steps.changes.outputs.needs_build == 'true'
410424
run: |

0 commit comments

Comments
 (0)