.github/workflows/update.yml #30
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
name: main | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- name: Cache Repository | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }} | |
key: ${{ runner.os }}-workspace | |
- name: Checkout This | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.repository }} | |
fetch-depth: 0 | |
path: '.' | |
- name: Checkout Review | |
uses: actions/checkout@v3 | |
with: | |
repository: Waver-Velvet/ust.space-data | |
fetch-depth: 1 | |
path: './data-review' | |
- name: Checkout Quota | |
uses: actions/checkout@v3 | |
with: | |
repository: FlandiaYingman/quota-data-at-ust | |
fetch-depth: 1 | |
path: './data-quota' | |
- name: Update Data | |
uses: './' | |
- name: Setup Commit This | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "UST Rankings Bot" | |
git add . | |
- name: Commit This | |
continue-on-error: true | |
# skip git hooks by -n | |
run: | | |
now=$(date +"%Y-%m-%d") | |
git commit -a -m "update: $now" -n | |
- name: Push This | |
uses: ad-m/github-push-action@master | |
with: | |
directory: ${{ github.workspace }} |