auto-merge #3706
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 | |
| on: | |
| workflow_dispatch: {} | |
| schedule: | |
| - cron: "5 10-21 * * 1-5" | |
| jobs: | |
| run-auto-merge: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - uses: actions/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.AUTO_MERGE_APP_ID }} | |
| private-key: ${{ secrets.AUTO_MERGE_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| - run: | | |
| echo "::add-mask::${{steps.app-token.outputs.token}}" | |
| - name: Get GitHub App User ID | |
| id: get-user-id | |
| run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| - run: | | |
| git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' | |
| git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>' | |
| - name: run merge tool | |
| run: | | |
| uv run --frozen auto-merge merge --action-run-repo-name ${{ github.repository }} --fc-nixos-dir fc-nixos | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| MATRIX_HOOKSHOT_URL: ${{ secrets.MATRIX_HOOKSHOT_URL }} | |
| MONITORING_REVIEW_URL: ${{ secrets.MONITORING_REVIEW_URL }} | |
| - uses: actions/upload-artifact@v4 | |
| if: success() || failure() | |
| with: | |
| name: status-json | |
| path: auto-merge-status.json | |
| if-no-files-found: error |