Skip to content

Commit 63abb63

Browse files
committed
ci(update-lexicons.yml): create PR instead of pushing to main branch
1 parent 535bd86 commit 63abb63

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/update-lexicons.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,16 @@ jobs:
3434
id: check-version-change
3535
run: echo "VERSION_CHANGED=$(pnpm run --silent --filter @tsky/lexicons check-version-change)" >> "$GITHUB_OUTPUT"
3636

37-
- name: 🔼 commit and push
37+
- name: 🔼 Create PR to update lexicons
3838
if: ${{ steps.check-version-change.outputs.VERSION_CHANGED == 'yes' }}
3939
run: |
4040
git config user.name "github-actions[bot]"
4141
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
42-
git diff --quiet || (git add . && git commit -m "chore: update lexicons.ts")
43-
git push
42+
git diff --quiet || (
43+
git switch --create gh-actions-update-lexicons &&
44+
git add . &&
45+
git commit -m "chore: update lexicons.ts"
46+
)
47+
gh pr create \
48+
--title 'chore: Update lexicons' \
49+
--body 'This PR is made via GitHub Actions workflow ([update-lexicons.yml](https://github.com/tsky-dev/tsky/blob/main/.github/workflows/update-lexicons.yml)) automatically.'

0 commit comments

Comments
 (0)