netlify.toml
configconfig.toml
- source repository, target repositories and branchGITHUB_TOKEN
you need personal one that have scope repo
for all your repositories that you want create PR's. Default in Github Action have access only to current repo.git clone https://github.com/abtris/hugo-netlify-autoupdater.git
cd hugo-netlify-autoupdater
go mod download
Configuration is in config.toml
file.
source_repo_releases = "gohugoio/hugo"
[[target_repos]]
repo = "owner/repo"
target_file = "netlify.toml"
target_variable = "HUGO_VERSION"
branch = "master"
make run
sequenceDiagram
autonumber
loop Every week
Scheduler (GitHub Actions)->>Hugo repository: Do you have a new release?
Hugo repository-->>Scheduler (GitHub Actions): Yes, I have a new $HUGO_VERSION!
opt Fail response
Hugo repository-->>Scheduler (GitHub Actions): No.
end
Scheduler (GitHub Actions)->>Blog repositories: Is this $HUGO_VERSION newer than your Hugo version?
Blog repositories-->>Scheduler (GitHub Actions): Yes, I have old version.
opt Fail response
Blog repositories-->>Scheduler (GitHub Actions): No, I already have this version.
end
Scheduler (GitHub Actions)->>Blog repositories: I will create PR with update to you!
end
MIT