Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use GH_TOKEN token for protected branch #1504

Merged
merged 2 commits into from
Aug 26, 2020

Conversation

nschonni
Copy link
Contributor

Allow continuing to use GitHub Secret as token for protected branch.

Allow continuing to use GitHub Secret as token for protected branch.
@nschonni
Copy link
Contributor Author

@mcking65 or @michael-n-cooper with this, the GitHub actions push should still work to the protected branches here if you set a GH_TOKEN GitHub secret for this repo https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets

For the forks, it falls back to the regular built-in token if they haven't set the variable, or protected the gh-pages branch.

@mcking65
Copy link
Contributor

mcking65 commented Aug 24, 2020

I will need @michael-n-cooper to create the secret with the token; it requires a repo owner.

@michael-n-cooper
Copy link
Member

I've created the GH_TOKEN secret.

@nschonni
Copy link
Contributor Author

Thanks @michael-n-cooper!
If you land this one @mcking65 we should be able to see if it's up and running again

@mcking65 mcking65 merged commit caba008 into w3c:master Aug 26, 2020
@nschonni nschonni deleted the token-for-gh-pages-push branch August 26, 2020 21:14
@nschonni
Copy link
Contributor Author

@michael-n-cooper sorry, I think the token might be wrong.

Can you try doing this to update the GH_TOKEN value:

  1. Go to https://github.com/settings/tokens/new
  2. Select public_repo as the only scope
  3. Update https://github.com/w3c/aria-practices/settings/secrets/GH_TOKEN
  4. Try to re-run the current failed job https://github.com/w3c/aria-practices/actions/runs/225990346

screen shot of selected public_repo scope

@michael-n-cooper
Copy link
Member

Sorry, I misunderstood what should be the secret. I gave it a random value. I updated it to be the value of the GH_TOKEN for the repository, and it appeared the job succeeded.

@nschonni
Copy link
Contributor Author

Awesome, thanks for the patience @michael-n-cooper, and sorry for the missing instructions at the start

@mcking65
Copy link
Contributor

Thank you @nschonni and @michael-n-cooper!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants