Skip to content

Remove the need for a custom SANDPAPER_WORKFLOW PAT #646

@Bisaloo

Description

@Bisaloo

Currently, the update-cache.yaml and update-cache.yaml workflows require a custom PAT:

token: ${{ secrets.SANDPAPER_WORKFLOW }}

token: ${{ secrets.SANDPAPER_WORKFLOW }}

But for the purpose of creating the pull requests, the default GITHUB_TOKEN token, provided in each GitHub Actions run, is sufficient, as shown in this example repo: Bisaloo/tutorials-early#2

Some extra work is required to trigger the other workflows that normally run when a pull request is opened since they won't run automatically when the pull request is created with GITHUB_TOKEN. However, it is still possible by manually triggering them (adding a workflow_dispatch: trigger in the workflows to start & running gh workflow run in the workflow opening the pull request).

Overall, the code would not be much more complex but there would be two immense benefits:

  • the creation and setting of the custom PAT is a very common source of pain for community members who start to use the workbench for externally hosted lessons. We regularly get message in the #workbench slack channel about this
  • having a custom PAT adds a single point of failure since it is attached to a specific individual. If this individual leaves the organization, the workflows will stop running

Relying on the default PAT would immediately resolve these two pain points.

What do you think? Is it something you'd like to receive a PR for? Are there other benefits of the custom PAT that I'm missing?

Metadata

Metadata

Assignees

Labels

Developer QOL 👷This feature enhances the developer quality of life

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions