Skip to content

Commit ec116d2

Browse files
committed
fix: add failure step for no packages found in GHCR
1 parent 107b58f commit ec116d2

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

workflow-templates/security-scan-apihub.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ jobs:
7171
if: ${{ steps.ghcr.outputs.has-packages == 'true' }}
7272
run: echo "Packages found!"
7373

74+
- name: No packages found, fail the job
75+
if: ${{ steps.ghcr.outputs.has-packages != 'true' }}
76+
run: |
77+
echo "No packages found in GHCR for this repository."
78+
exit 1
79+
80+
7481
security-scan-matrix:
7582
needs: debug-packages
7683
if: ${{ inputs.image == '' || inputs.image == null }}

workflow-templates/security-scan.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ jobs:
7171
if: ${{ steps.ghcr.outputs.has-packages == 'true' }}
7272
run: echo "Packages found!"
7373

74+
- name: No packages found, fail the job
75+
if: ${{ steps.ghcr.outputs.has-packages != 'true' }}
76+
run: |
77+
echo "No packages found in GHCR for this repository."
78+
exit 1
79+
7480
security-scan-matrix:
7581
needs: debug-packages
7682
if: ${{ inputs.image == '' || inputs.image == null }}

0 commit comments

Comments
 (0)