Merge branch 'master' of github.com:tzok/mcq4structures #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Rebase | |
on: | |
push: | |
branches: ["master"] | |
jobs: | |
auto-rebase-dependabot-branches: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo | |
- run: | | |
for ref in $(gh pr list --author 'app/dependabot' --json 'baseRefName,headRefName' | jq -r '.[] | select(.baseRefName == "master") | .headRefName'); do | |
git checkout "${ref}" | |
git rebase master | |
git push origin --force | |
done | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |