Update Postman Collection Nightly #3
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 Postman Collection Nightly | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs every night at midnight | |
workflow_dispatch: # Allow manual triggering from the Actions tab | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip install requests | |
- name: Execute Python script | |
env: | |
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }} | |
run: python generate.py | |
- name: Commit changes | |
run: | | |
git config --local user.email "actions@github.com" | |
git config --local user.name "GitHub Actions" | |
git add ./steam_api_collection.json | |
git commit -m "Update Postman Collection [skip ci]" | |
git push |