2
0

build.yml 828 B

123456789101112131415161718192021222324252627282930
  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. gh pr review --approve "$PR_URL"
  25. gh pr merge --squash --auto "$PR_URL"
  26. env:
  27. PR_URL: ${{github.event.pull_request.html_url}}
  28. GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}