build.yml 886 B

1234567891011121314151617181920212223242526272829303132
  1. name: build
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. uses: charmbracelet/meta/.github/workflows/build.yml@main
  6. with:
  7. go-version: ""
  8. go-version-file: ./go.mod
  9. secrets:
  10. gh_pat: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
  11. dependabot:
  12. needs: [build]
  13. runs-on: ubuntu-latest
  14. permissions:
  15. pull-requests: write
  16. contents: write
  17. if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
  18. steps:
  19. - id: metadata
  20. uses: dependabot/fetch-metadata@v2
  21. with:
  22. github-token: "${{ secrets.GITHUB_TOKEN }}"
  23. - run: |
  24. echo "Approving..."
  25. gh pr review --approve "$PR_URL"
  26. echo "Merging..."
  27. gh pr merge --squash --auto "$PR_URL"
  28. env:
  29. PR_URL: ${{github.event.pull_request.html_url}}
  30. GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}