Nightly Bump #593
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: 'Nightly Bump' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 1 * * *' # every night at 1 am UTC | |
jobs: | |
bump: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@v3 | |
# create a file at src/date.txt with the current date | |
- name: Create date file | |
run: echo $(date) > src/date.txt | |
# commit the file | |
- name: Commit date file | |
run: | | |
git config --local user.name "GitHub Actions" | |
git config --local user.email "[email protected]" | |
git add src/date.txt | |
git commit -m "Update date.txt" | |
# push the commit | |
- name: Push commit | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |