From b88d668e6313e6add988ff970f0a534f091197b0 Mon Sep 17 00:00:00 2001 From: moleyi Date: Fri, 13 Sep 2024 09:47:45 +0000 Subject: [PATCH] feat: test --- .github/workflows/clear-branch.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/clear-branch.yml b/.github/workflows/clear-branch.yml index 07cc90bcc39..cd48bdbd37c 100644 --- a/.github/workflows/clear-branch.yml +++ b/.github/workflows/clear-branch.yml @@ -3,6 +3,9 @@ name: Clear Branch on: schedule: - cron: '0 8 * * *' # Runs every day at 0:00 Beijing Time (8:00 UTC) + push: + branches: + - feature-ci workflow_dispatch: inputs: ref: @@ -26,6 +29,7 @@ jobs: git fetch --prune current_branch=$(git rev-parse --abbrev-ref HEAD) protected_branches=$(gh api /repos/${{ github.repository }}/branches --jq '.[] | select(.protected == true) | .name' | tr '\n' ' ') + echo "All protected branch: ${protected_branches}" for branch in $(git branch -r | sed 's/origin\///'|grep -v origin); do if [[ " ${protected_branches[@]} " =~ " ${branch} " ]]; then echo "Skipping protected branch: $branch"