Skip to content

Commit a5007c7

Browse files
authored
Merge pull request #993 from Wikid82/main
Propagate changes from main into development
2 parents 5bdbdf8 + 302d37d commit a5007c7

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/security-pr.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,12 @@ jobs:
226226
ARTIFACT_ID=$(printf '%s' "${ARTIFACTS_JSON}" | jq -r --arg name "${ARTIFACT_NAME}" '.artifacts[] | select(.name == $name) | .id' | head -n 1)
227227
228228
if [[ -z "${ARTIFACT_ID}" ]]; then
229-
echo " reason_category=not_found"
230-
echo "reason=Required artifact was not found"
229+
echo "⚠️ reason_category=not_found"
230+
echo "reason=Artifact not found — build was likely skipped (e.g., renovate/chore PR)"
231231
echo "upstream_run_id=${RUN_ID}"
232232
echo "artifact_name=${ARTIFACT_NAME}"
233-
exit 1
233+
echo "artifact_exists=false" >> "$GITHUB_OUTPUT"
234+
exit 0
234235
fi
235236
236237
{
@@ -241,7 +242,7 @@ jobs:
241242
echo "✅ Found artifact: ${ARTIFACT_NAME} (ID: ${ARTIFACT_ID})"
242243
243244
- name: Download PR image artifact
244-
if: github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch'
245+
if: (github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch') && steps.check-artifact.outputs.artifact_exists == 'true'
245246
# actions/download-artifact v4.1.8
246247
uses: actions/download-artifact@484a0b528fb4d7bd804637ccb632e47a0e638317
247248
with:
@@ -250,7 +251,7 @@ jobs:
250251
github-token: ${{ secrets.GITHUB_TOKEN }}
251252

252253
- name: Load Docker image
253-
if: github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch'
254+
if: (github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch') && steps.check-artifact.outputs.artifact_exists == 'true'
254255
id: load-image
255256
run: |
256257
echo "📦 Loading Docker image..."

0 commit comments

Comments
 (0)