automerge #69
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: automerge | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 12 * * *' # Should run 30 min after get remote assets. | |
env: | |
GH_TOKEN: ${{ github.token }} | |
TARGET_REPO: agdr-docs | |
LABEL_NAME: auto_merge | |
jobs: | |
automerge: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: | | |
for branch in $(gh pr list -R ${TARGET_REPO} --label "${LABEL_NAME}" --json headRefName --jq .[].headRefName);do | |
git checkout $branch | |
gh pr merge --squash --auto --delete-branch | |
done | |