update-flake.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: update-flake
  2. on:
  3. # run action when a change lands in the main branch which updates go.mod. Also
  4. # allow manual triggering.
  5. push:
  6. branches:
  7. - main
  8. paths:
  9. - go.mod
  10. - .github/workflows/update-flakes.yml
  11. workflow_dispatch:
  12. concurrency:
  13. group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
  14. cancel-in-progress: true
  15. jobs:
  16. update-flake:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - name: Check out code
  20. uses: actions/checkout@v4
  21. - name: Run update-flakes
  22. run: ./update-flake.sh
  23. - name: Get access token
  24. uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0
  25. id: generate-token
  26. with:
  27. app_id: ${{ secrets.LICENSING_APP_ID }}
  28. installation_id: ${{ secrets.LICENSING_APP_INSTALLATION_ID }}
  29. private_key: ${{ secrets.LICENSING_APP_PRIVATE_KEY }}
  30. - name: Send pull request
  31. uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 #v5.0.1
  32. with:
  33. token: ${{ steps.generate-token.outputs.token }}
  34. author: Flakes Updater <[email protected]>
  35. committer: Flakes Updater <[email protected]>
  36. branch: flakes
  37. commit-message: "go.mod.sri: update SRI hash for go.mod changes"
  38. title: "go.mod.sri: update SRI hash for go.mod changes"
  39. body: Triggered by ${{ github.repository }}@${{ github.sha }}
  40. signoff: true
  41. delete-branch: true
  42. reviewers: danderson