GitHub check

Whole log, 6 KB
Current runner version: '2.338.0'
▸ Runner Image Provisioner
Hosted Compute Agent
Version: 20261012.601
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {40fa4ad8-026e-4eaa-b16b-86c197f9b4cf}
Region: northcentralus
Cloud: Azure
▸ Operating System
Ubuntu
24.04.5
LTS
▸ Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
▸ GITHUB_TOKEN Permissions
Contents: write
Metadata: read
PullRequests: write
Secret source: Actions
Cache mode: read
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' (SHA:ed597411d8f924073f98dfc5c65a23a2325f34cd)
Complete job name: Remove preview download
▸ Run set -euo pipefail
set -euo pipefail

tag="desktop-preview"

# A stale cleanup must not delete a download that became valid
# again. If the PR is open and labeled once more, the next publish
# owns this PR's assets and replaces them itself.
if [[ "$(gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" \
  --json state,labels \
  --jq '.state + " " + (.labels | map(.name) | contains(["preview:mac"]) | tostring)')" == "OPEN true" ]]; then
  echo "PR is open and labeled again. Skipping cleanup."
  echo "removed=false" >> "$GITHUB_OUTPUT"
  exit 0
fi

echo "removed=true" >> "$GITHUB_OUTPUT"

if ! gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
  echo "No preview release exists. Nothing to clean up."
  exit 0
fi

gh release view "$tag" --repo "$GITHUB_REPOSITORY" --json assets --jq '.assets[].name' \
  | { grep -F -- "-pr.${PR_NUMBER}." || true; } \
  | while read -r asset; do
      gh release delete-asset "$tag" "$asset" --repo "$GITHUB_REPOSITORY" --yes \
        || echo "Asset $asset was already removed by a concurrent run."
    done
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
  GH_TOKEN: ***
  PR_NUMBER: 23892
▸ Run actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
with:
  script: const marker = "<!-- desktop-macos-preview -->";
const comments = await github.paginate(github.rest.issues.listComments, {
  owner: context.repo.owner,
  repo: context.repo.repo,
  issue_number: context.payload.pull_request.number,
  per_page: 100,
});
const existing = comments.find(
  (comment) => comment.user?.login === "github-actions[bot]" && comment.body?.includes(marker),
);
if (!existing) {
  return;
}

await github.rest.issues.updateComment({
  owner: context.repo.owner,
  repo: context.repo.repo,
  comment_id: existing.id,
  body: [
    marker,
    "### macOS preview",
    "",
    "The preview download was removed because this PR closed or the preview label was removed.",
  ].join("\n"),
});

  github-token: ***
  debug: false
  user-agent: actions/github-script
  result-encoding: json
  retries: 0
  retry-exempt-status-codes: 400,401,403,404,422
Cleaning up orphan processes