This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Updating CI/CD to check for protected branch and use token so workflow re-runs (release/21.0.x branch) #756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
When merging with protected branches, the yarn.lock updates will fail to push. This will check if the branch is protected and avoid pushing and failing.
Additionally, the workflow needs to re-run and succeed in order to easily merge. However, the
github.token
supplied to GitHub Actions will not re-run a workflow if it fires the event to avoid infinite runs of the workflow. Adding and using a different token will allow the workflow to re-run. Infinite runs is not an issue for this workflow since it only runs again if there are any updates to the dependencies.Since forks wouldn't have the token set in their repo secrets but all repos have
github.token
set inside workflows, it was also important to create a conditional that allows the workflow to checkout with either token so workflows ran in forks won't fail without the token in the repo secrets.Second PR to cherry pick commits to release/21.0.x branch
API Changes
Documentation Additions