Generate JSON and Publish Artifact #36
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 JSON and Publish Artifact | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: self-hosted | |
environment: | |
name: publishJson | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Run Python script | |
run: python barrinha_data.py | |
- name: Commit report | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
git config --global user.name 'runner' | |
git config --global user.email '[email protected]' | |
git add . | |
git commit -m "Auto-commit changes" | |
git push | |
else | |
echo "No changes to commit." | |
fi |