microsoft / design-to-code

A system of development tools, and utilities used à la carte or as a suite to build enterprise-grade websites and applications.
MIT License
24 stars 6 forks source link

Update workflow to use a GitHub PAT for pushing changes to a protected branch #123

Closed janechu closed 3 years ago

janechu commented 3 years ago

Pull Request

📖 Description

Due to the face that the default GITHUB_TOKEN available to GitHub actions cannot push commits to protected branches, a new PAT has been added to the repository and referenced in the workflow. This should allow publish commits and tags to be pushed by the workflow.

👩‍💻 Reviewer Notes

The documentation from GitHub indicates that for extra permissions, this is the only solution, see https://docs.github.com/en/actions/security-guides/automatic-token-authentication#granting-additional-permissions

The permissions that the GITHUB_TOKEN does not cover includes git actions such as pushing commits, so there is no way to grant the generated token write access.

✅ Checklist

General