Skip to content

Commit 87c6916

Browse files
committed
fix: create pr on submit
1 parent 3ae86ff commit 87c6916

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/update-bundle.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
contents: write
13+
pull-requests: write
1314

1415
steps:
1516
- name: Checkout repository
@@ -40,13 +41,18 @@ jobs:
4041
run: ./run.sh build
4142

4243
- name: Export bundle
43-
run: ./run.sh export crypto-ecosystems-bundle.jsonl
44-
45-
- name: Commit and push if changed
4644
run: |
47-
git remote set-url origin https://github.com/${{ github.repository }}.git
45+
./run.sh export crypto-ecosystems-bundle.jsonl
4846
git lfs track "crypto-ecosystems-bundle.jsonl"
49-
git add .gitattributes
50-
git add crypto-ecosystems-bundle.jsonl
51-
git diff --staged --quiet || git commit -m "Update crypto-ecosystems-bundle.jsonl"
52-
git push origin master
47+
48+
- name: Create Pull Request if changed
49+
uses: peter-evans/create-pull-request@v5
50+
with:
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
commit-message: "Update crypto-ecosystems-bundle.jsonl"
53+
title: "Update crypto-ecosystems bundle"
54+
body: "Automated update of crypto-ecosystems bundle file"
55+
branch: "update-bundle-${{ github.run_number }}"
56+
add-paths: |
57+
.gitattributes
58+
crypto-ecosystems-bundle.jsonl

0 commit comments

Comments
 (0)