Generate random data #22525
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate random data | |
on: | |
schedule: | |
- cron: "0 * * * *" | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set git config user to GitHub Bot | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Generate random file | |
run: | | |
FILENAME="./data/$GITHUB_RUN_ID.txt" | |
wget https://litipsum.com/api -O $FILENAME | |
git add $FILENAME | |
git diff-index --quiet HEAD || git commit -m "add random file ${{ github.run_id }}.txt" | |
git push |