fregante / ghat

🛕 Reuse GitHub Actions workflows across repositories
https://npm.im/ghat
MIT License
264 stars 9 forks source link

github action workflow to auto-update workflow files on a cron? #28

Closed ljharb closed 3 years ago

ljharb commented 3 years ago

Is there any chance you have an existing action that will run ghat, and if needed, commit and push the changes, so I can set it up with a cron?

fregante commented 3 years ago

I don't have it and I'd rather not make one since the readme says it's not meant to be used that way (since there's no versioning, it could very well be a footgun)

I think it would be as easy as:

- uses: fregante/setup-git-user@v1
- run: npx ghat
- run: git commit -m 'Workflow updates' -a || true
- run: git push origin HEAD:master
ljharb commented 3 years ago

Fair point, thanks

fregante commented 3 years ago

I updated the example to include a git config action: https://github.com/fregante/setup-git-user