https://github.com/kludex/update-file
GitHub Action to update files based on a cron & custom script! :smile:
https://github.com/kludex/update-file
Last synced: about 2 months ago
JSON representation
GitHub Action to update files based on a cron & custom script! :smile:
- Host: GitHub
- URL: https://github.com/kludex/update-file
- Owner: Kludex
- License: mit
- Created: 2020-11-10T23:44:56.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-26T19:12:25.000Z (almost 5 years ago)
- Last Synced: 2025-07-04T22:40:24.996Z (3 months ago)
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Update File
Automatically update a file based on a script.
Currently we only support Python scripts. If asked, support for other languages can be added.
## How to use
Install this GitHub action by creating a file in your repo at `.github/workflows/update-file.yml`.
A minimal example could be:
```YAML
name: Update Fileon:
push:
schedule:
- cron: "0 0 * * *"jobs:
update-file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: kludex/update-file
with:
script_file: update_script.py
update_file: README.md
```
In this minimal example, you need:
- `script_file`: script location
- `update_file`: file to updateAnd it will run on `push` and on `schedule` (`cron: "0 0 * * *"`), so each day at midnight the script `update_script.py` will update the `README.md`.
## License
This project is licensed under the terms of the MIT license.