Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages-workflows/process-web-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ permissions:
contents: write
issues: write
pull-requests: write
actions: write # to trigger update-index via workflow_dispatch after auto-merge

env:
# Set to "false" to require a human maintainer to merge every publish PR.
Expand Down Expand Up @@ -305,7 +306,15 @@ jobs:
"$SUBMITTER" "$VER" "$ARCH" "$WANT_SHA" "$ASSET_NAME" "$DEB_URL" "${{ github.server_url }}" "${{ github.repository }}" "${{ github.run_id }}")")
echo "url=$PR_URL" >> "$GITHUB_OUTPUT"
if [ "$AUTO_MERGE" = "true" ]; then
gh pr merge "$PR_URL" --squash --delete-branch || echo "::warning::auto-merge failed; awaiting manual review"
if gh pr merge "$PR_URL" --squash --delete-branch; then
# The merge is pushed with GITHUB_TOKEN, which by design does NOT
# trigger the push-based update-index workflow. Kick it off
# explicitly (workflow_dispatch is allowed from GITHUB_TOKEN) so the
# APT index and Pages reflect the new version right away.
gh workflow run update-index.yml --ref main || echo "::warning::could not trigger update-index; run it manually"
else
echo "::warning::auto-merge failed; awaiting manual review"
fi
fi

- name: Report failure to the submitter
Expand Down
10 changes: 9 additions & 1 deletion packages-workflows/process-web-unpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ permissions:
contents: write
issues: write
pull-requests: write
actions: write # to trigger update-index via workflow_dispatch after auto-merge

env:
AUTO_MERGE: "true"
Expand Down Expand Up @@ -82,7 +83,14 @@ jobs:
--title "unpublish: $PKG $VER (portal request by @$SUBMITTER)" \
--body "Removal requested by @$SUBMITTER via the developer portal. Ownership verified against the recorded uploader (\`uploaded_by\`).")
if [ "$AUTO_MERGE" = "true" ]; then
gh pr merge "$PR_URL" --squash --delete-branch || echo "::warning::auto-merge failed; awaiting manual review"
if gh pr merge "$PR_URL" --squash --delete-branch; then
# GITHUB_TOKEN pushes don't trigger the push-based update-index
# workflow; dispatch it explicitly so the removal drops from the
# APT index right away.
gh workflow run update-index.yml --ref main || echo "::warning::could not trigger update-index; run it manually"
else
echo "::warning::auto-merge failed; awaiting manual review"
fi
fi
fi
printf 'errors<<EOM\n%b\nEOM\n' "$ERR" >> "$GITHUB_OUTPUT"
Expand Down
Loading