Skip to content

Commit 0bf3645

Browse files
committed
Enable auto-merge for the created pull request
1 parent 5be168a commit 0bf3645

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/models.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: models
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *"
4+
push:
5+
branches: [ main ]
6+
# schedule:
7+
# - cron: "0 0 * * *"
68

79
jobs:
810
update:
@@ -28,6 +30,7 @@ jobs:
2830
git diff --exit-code langgraphics/metadata/models.json || echo "::set-output name=differs::true"
2931
3032
- name: Create Pull Request
33+
id: create-pr
3134
if: steps.compare.outputs.differs == 'true'
3235
uses: peter-evans/create-pull-request@v5
3336
with:
@@ -40,3 +43,14 @@ jobs:
4043
title: Update the models metadata
4144
commit-message: Update the models metadata
4245
body: This PR updates the models metadata to keep the repository up-to-date with the upstream model costs.
46+
47+
- name: Enable auto-merge
48+
if: steps.create-pr.outputs.pull-request-number != ''
49+
env:
50+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
51+
run: |
52+
gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} \
53+
--auto \
54+
--merge \
55+
--subject "Update the models metadata (GH-${{ steps.create-pr.outputs.pull-request-number }})" \
56+
--body "Co-authored-by: Artyom Vancyan <44609997+artyomvancyan@users.noreply.github.com>"

0 commit comments

Comments
 (0)