feat: narrow the special handling of github to just latest version #343
Workflow file for this run
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: Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| name: Tests Succeeded | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - run: make test | |
| auto-merge: | |
| name: Automatically merge bot PRs | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create token | |
| if: (github.actor == 'dependabot[bot]' || github.actor == 'crd-automation[bot]') && github.event_name == 'pull_request' | |
| id: app-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ vars.AUTOMATION_APP_ID }} | |
| private-key: ${{ secrets.AUTOMATION_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: catalog | |
| - name: Merge PR | |
| if: (github.actor == 'dependabot[bot]' || github.actor == 'crd-automation[bot]') && github.event_name == 'pull_request' | |
| run: gh pr merge --admin --squash "$PR_URL" | |
| env: | |
| PR_URL: ${{ github.event.pull_request.html_url }} | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} |