Skip to content

Commit 5c4c7e4

Browse files
t3dotggclaude
andcommitted
only mark the preview comment removed when assets were removed
Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 12d31ce commit 5c4c7e4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/desktop-macos-preview.yml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ jobs:
295295
contents: write
296296
pull-requests: write
297297
steps:
298-
- name: Delete this PR's preview assets
298+
- id: delete
299+
name: Delete this PR's preview assets
299300
shell: bash
300301
env:
301302
GH_TOKEN: ${{ github.token }}
@@ -312,9 +313,12 @@ jobs:
312313
--json state,labels \
313314
--jq '.state + " " + (.labels | map(.name) | contains(["preview:mac"]) | tostring)')" == "OPEN true" ]]; then
314315
echo "PR is open and labeled again. Skipping cleanup."
316+
echo "removed=false" >> "$GITHUB_OUTPUT"
315317
exit 0
316318
fi
317319
320+
echo "removed=true" >> "$GITHUB_OUTPUT"
321+
318322
if ! gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
319323
echo "No preview release exists. Nothing to clean up."
320324
exit 0
@@ -328,6 +332,7 @@ jobs:
328332
done
329333
330334
- name: Mark the preview comment as removed
335+
if: steps.delete.outputs.removed == 'true'
331336
uses: actions/github-script@v8
332337
with:
333338
script: |

0 commit comments

Comments
 (0)