This repository has been created to facilitate updating your forked repositories with review actions. Especially helpful when having a separate organization for all your forked GitHub Actions (as you should for security reasons). Read more on that topic here.
Process:
GitHubForkUpdater
repository will be created.update-fork
to the issue, your fork will be updatedWatch the demo video here:
Or follow these steps:
check-workflow.yml
and allow the schedule to run (GitHub security feature).PAT_GITHUB
containing a GitHub Personal Access Token with these scopes: public_repo, read:org, read:user, repo:status, repo_deployment
(see below on why).check-workflow.yml
workflow manually for the first run or wait for the schedule to run.The scheduled runs are planned at weekdays, at 7 AM.
The check-workflow will iterate all repositories in the same organization (or user) and find the ones that are forks of another repository (called parent repository). For the forks it will check if there are updates available in the parent repository and if so, create new issues in this repository (GitHubForkUpdater) with a link to verify those changes.
This workflow will run using the default GITHUB_TOKEN
, which is enough to iterate through your own public repositories and check the public parents for incoming changes.
The issues will have links for you to review all incoming changes from the parent repository. Please go through all those changes and review if you want to pull in the changes. Especially for GitHub Actions you use, it is very important to review the changes: otherwise you are updating code from the internet that will run in your own workflows 😱.
After reviewing the changes in the parent repository, you can decide to pull in those changes into your own fork. Adding the label update-fork
on the issues will trigger the update-workflow
to pull in the incoming changes. The issue will be updated when the workflow starts and be closed when the workflow has completed successfully.
Note: currently only the default branch
will be updated.
To be able to push the incoming changes into your fork we need a GitHub Personal Access Token used in this workflow with the name PAT_GITHUB
. This token needs to have the following scopes: public_repo*, read:org, read:user, repo:status*, repo_deployment*, workflow
.
*
These scopes are set by default when the workflows
scope is set