Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
change code as it didnt work now
  • Loading branch information
DeBelg authored Oct 15, 2024
1 parent 8d4c536 commit 9c00835
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
name: autoupdate
name: Auto Update Pull Request Branches
on:
push: {}
push:
branches:
- main
jobs:
autoupdate:
name: autoupdate
runs-on: ubuntu-22.04
update-prs:
runs-on: ubuntu-latest
steps:
- uses: docker://chinthakagodawita/autoupdate-action:v1
id: autoupdate
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_CONFLICT_ACTION: "FAIL"
- name: Checkout repository
uses: actions/checkout@v2

- name: Auto-update PR branches
run: |
PRS=$(gh pr list --base main --state open --json number -q '.[].number')
for pr in $PRS; do
gh pr merge main --merge --auto --pr $pr || echo "PR #$pr couldn't be updated"
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9c00835

Please sign in to comment.