The new error message from #10 now works okay:
Run if ! gh api -X GET "repos/$GITHUB_REPOSITORY/actions/variables" --silent 2>/dev/null; then
Error: ❌ The token cannot manage Actions variables for this repository.
To fix this:
Create a fine-grained Personal Access Token at:
https://github.com/settings/personal-access-tokens/new
Grant it access to this repository with 'Actions: Read and write'.
Add it as a repository secret named SETUP_BLOG_PAT:
https://github.com/HanClinto/SimpleGitBlog/settings/secrets/actions/new
Re-run this workflow.
Error: Process completed with exit code 1.
But overall this doesn't feel great, and seems to go against the ideals of the project for being welcoming to non-developers. I don't like the idea of non-developers needing to create a fine-grained PAT in order to run the very first onbording script -- isn't there something better we can do?
Maybe we have a special issue that is created as one of the first issues on the site that is called "config" or something, and owners can edit that issue in order to set config variables for the project -- I don't know. Come up with a couple of different options if you can, but the current behavior is unacceptably out of line with our project goals.
The new error message from #10 now works okay:
Run if ! gh api -X GET "repos/$GITHUB_REPOSITORY/actions/variables" --silent 2>/dev/null; then
Error: ❌ The token cannot manage Actions variables for this repository.
To fix this:
But overall this doesn't feel great, and seems to go against the ideals of the project for being welcoming to non-developers. I don't like the idea of non-developers needing to create a fine-grained PAT in order to run the very first onbording script -- isn't there something better we can do?
Maybe we have a special issue that is created as one of the first issues on the site that is called "config" or something, and owners can edit that issue in order to set config variables for the project -- I don't know. Come up with a couple of different options if you can, but the current behavior is unacceptably out of line with our project goals.