Skip to content

Commit 6dbc21e

Browse files
authored
ci: delete testing fork pre-releases in the upstream context (#49)
1 parent e34e518 commit 6dbc21e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/delete-pr-build-on-close.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
name: Delete pre-release when a branch is deleted
2-
# Runs when PRs are merged or closed.
2+
# This workflow action deletes pre-releases when a PR is merged or closed.
3+
#
4+
# The CircleCI configuration builds CLI binaries when a PR is opened.
5+
# These are uploaded to the upstream project as GitHub (pre-)releases.
6+
#
7+
# The release tag matches one of the following patterns:
8+
# - v1.2.3-example-branch-placeholder # Branches on upstream
9+
# - v1.2.3-pull-12-head # Branches from forks
10+
#
11+
# A "pull_request_target" event is used to delete pre-releases upstream.
12+
#
313
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges
4-
# The circleci config builds CLI binaries when a PR is opened and hosts them under a GitHub (pre-)release named after the PR branch
5-
# This workflow action deletes that pre-release when a PR is merged or closed.
14+
# See https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target
615
on:
7-
pull_request:
16+
pull_request_target:
817
types:
918
- closed
1019

0 commit comments

Comments
 (0)