GitHub Actions CRON workflow experiments with persisting CSV, SQLite and PostgreSQL databases to GitHub Actions cache and Git commits
Use actions/cache
to store a database on ephemeral GitHub cloud storage for short-lived, non-critical data
Caveats (from Usage limits and eviction policy and the GitHub Actions cache warnings):
- Caches that have not been accessed in 7 days will be removed
- The total size of all caches in a repository is limited to 10GB
- Don't store any sensitive information (eg. access tokens or login credentials) in the cache - anyone with read access can create a pull request on a repository to access the contents of a cache
- Caches from workflow runs are stored on GitHub-owned cloud storage
Use GitHub repository storage to store a database for smaller, longer-lived data
Caveats (from About large files on GitHub)
- GitHub blocks files larger than 100MB
- GitHub strongly recommends repositories smaller than 5GB
Saves a CSV database to GitHub Actions Cache
Run 1:
- Does not find a cache
- Creates the CSV database file and adds a first message record
- Saves the file to the GitHub Actions cache
A screenshot of run 1 in the GitHub Actions interface
Run 2:
- Finds a cache with the CSV database file
- Adds a new record to the existing records
- Saves the file to the GitHub Actions cache
A screenshot of run 2 in the GitHub Actions interface
Run 3:
- Finds a cache with the CSV database file
- Removes expired records
- Adds a new record to the existing records
- Saves the file to the GitHub Actions cache
A screenshot of run 3 in the GitHub Actions interface
Saves a CSV database to Git commits on GitHub
Run 1:
- Creates a CSV database file since no file exists
- Adds a new record
- Saves the file to a new Git commit on GitHub
A screenshot of run 1 in the GitHub Actions interface and the resulting committed file
Run 2:
- Adds a new record to the existing records
- Saves the file to a new Git commit on GitHub
A screenshot of run 2 in the GitHub Actions interface and the resulting committed file
Run 3:
- Removes expired records
- Adds a new record to the existing records
- Saves the file to a new Git commit on GitHub
A screenshot of run 3 in the GitHub Actions interface and the resulting committed file
TODO
TODO
TODO
TODO