Auto-merge stale PRs #1037
This file contains hidden or 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-merge stale PRs | |
| 'on': | |
| workflow_dispatch: | |
| schedule: | |
| # Every 12 hours | |
| - cron: '0 */12 * * *' | |
| jobs: | |
| auto-merge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: pnpm | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: pnpm install --ignore-scripts | |
| - name: Generate GitHub App token | |
| uses: actions/create-github-app-token@v2 | |
| id: generate-token | |
| with: | |
| app-id: ${{ secrets.ECOSPARK_APP_ID }} | |
| private-key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }} | |
| - name: Auto merge stale | |
| run: pnpm run ci:auto-merge-stale | |
| env: | |
| GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} |