Skip to content

Commit

Permalink
now PR with label
Browse files Browse the repository at this point in the history
deploy
  • Loading branch information
trueberryless committed Nov 25, 2024
1 parent 6f72ecd commit b641686
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@ jobs:
npm install -g sort-package-json
npm install -g markdown-replace-section
- name: Ensure "🤖 bot" label exists
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET_REPO: ${{ matrix.repo }}
run: |
# Check if label exists in target repository, create if not
if ! gh label list -R "$TARGET_REPO" | grep -q "🤖 bot"; then
gh label create "🤖 bot" \
--description "Automatically generated pull request" \
--color "0075ca" \
-R "$TARGET_REPO"
fi
- name: Update template files in target repository
env:
GH_TOKEN: ${{ secrets.PUBLIC_GITHUB_TOKEN }}
Expand Down Expand Up @@ -303,7 +316,8 @@ jobs:
--base main \
--head "$branch_name" \
--title "[ci] sync template files" \
--body "$description"
--body "$description" \
--label "🤖 bot"
fi
fi
Expand Down

0 comments on commit b641686

Please sign in to comment.