Update Data #118925
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: Update Data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "*/10 * * * *" | |
concurrency: one-at-a-time | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: pip install poetry && poetry install | |
- name: Update data | |
run: poetry run python main.py | |
- name: Push changes | |
run: | | |
set -x | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
if [[ $(git status --porcelain sovietscloset.json CHANGELOG.md OOPSIES.md) ]]; then | |
git add raw | |
git commit -m "$(date -u +"%Y-%m-%dT%H:%M:%SZ") raw" | |
git add sovietscloset.json CHANGELOG.md OOPSIES.md | |
git commit -m "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" | |
git push origin master | |
fi |