update-webclient-prebuilt.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. name: update-webclient-prebuilt
  2. on:
  3. # manually triggered
  4. workflow_dispatch:
  5. concurrency:
  6. group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
  7. cancel-in-progress: true
  8. jobs:
  9. update-webclient-prebuilt:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Check out code
  13. uses: actions/checkout@v4
  14. - name: Run go get
  15. run: |
  16. ./tool/go version # build gocross if needed using regular GOPROXY
  17. GOPROXY=direct ./tool/go get github.com/tailscale/web-client-prebuilt
  18. ./tool/go mod tidy
  19. - name: Get access token
  20. uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0
  21. id: generate-token
  22. with:
  23. # TODO(will): this should use the code updater app rather than licensing.
  24. # It has the same permissions, so not a big deal, but still.
  25. app_id: ${{ secrets.LICENSING_APP_ID }}
  26. installation_id: ${{ secrets.LICENSING_APP_INSTALLATION_ID }}
  27. private_key: ${{ secrets.LICENSING_APP_PRIVATE_KEY }}
  28. - name: Send pull request
  29. id: pull-request
  30. uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 #v5.0.1
  31. with:
  32. token: ${{ steps.generate-token.outputs.token }}
  33. author: OSS Updater <[email protected]>
  34. committer: OSS Updater <[email protected]>
  35. branch: actions/update-webclient-prebuilt
  36. commit-message: "go.mod: update web-client-prebuilt module"
  37. title: "go.mod: update web-client-prebuilt module"
  38. body: Triggered by ${{ github.repository }}@${{ github.sha }}
  39. signoff: true
  40. delete-branch: true
  41. reviewers: ${{ github.triggering_actor }}
  42. - name: Summary
  43. if: ${{ steps.pull-request.outputs.pull-request-number }}
  44. run: echo "${{ steps.pull-request.outputs.pull-request-operation}} ${{ steps.pull-request.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY