Skip to content

Update Shop Status #2041

Update Shop Status

Update Shop Status #2041

Workflow file for this run

name: Update Shop Status
on:
schedule:
- cron: '0 */1 * * *' # Every hour
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install requests beautifulsoup4
- name: Run shop checker
run: python check_url.py
- name: Commit and push if changed
env:
TOKEN: ${{ secrets.PAT_OPENNX_SHOP_STATUS }}
run: |
git config user.name "GitHub Action"
git config user.email "action@github.com"
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
git add tinfoil.json
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "🔁 Update tinfoil shop status"
git push
fi