update-webclient-prebuilt.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  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@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.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_retrieval_mode: "id"
  27. installation_retrieval_payload: ${{ secrets.LICENSING_APP_INSTALLATION_ID }}
  28. private_key: ${{ secrets.LICENSING_APP_PRIVATE_KEY }}
  29. - name: Send pull request
  30. id: pull-request
  31. uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5
  32. with:
  33. token: ${{ steps.generate-token.outputs.token }}
  34. author: OSS Updater <[email protected]>
  35. committer: OSS Updater <[email protected]>
  36. branch: actions/update-webclient-prebuilt
  37. commit-message: "go.mod: update web-client-prebuilt module"
  38. title: "go.mod: update web-client-prebuilt module"
  39. body: Triggered by ${{ github.repository }}@${{ github.sha }}
  40. signoff: true
  41. delete-branch: true
  42. reviewers: ${{ github.triggering_actor }}
  43. - name: Summary
  44. if: ${{ steps.pull-request.outputs.pull-request-number }}
  45. run: echo "${{ steps.pull-request.outputs.pull-request-operation}} ${{ steps.pull-request.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY