GitHub Repository Scheduled Update Using GitHub Actions
Introduction
GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. There could be some other cool things that can be automated by GitHub Actions, such as closing stale GitHub issues, tagging GitHub merge requests, or even crypto mining (strongly discouraged)!
In this blog post, I would like to quickly show how to use GitHub scheduled actions to update the repository itself routinely.
What’s the Date Today?
In this example, we created a GitHub repository “What’s the date today?” whose README contains the date today that will be automatically updated everyday using GitHub Actions.
More specifically, what we have to do are as follows.
- Create an empty repository.
- Turn on the repository write permission for GitHub Actions.
- Create the following
yaml
file and placed it in the.github/workflows
directory.
1 | name: GitHub Self-Updating Repository Demo |
References
GitHub Repository Scheduled Update Using GitHub Actions
https://leimao.github.io/blog/GitHub-Repo-Scheduled-Update-GitHub-Actions/