-
-
Notifications
You must be signed in to change notification settings - Fork 41
42 lines (34 loc) · 1.04 KB
/
update.yml
File metadata and controls
42 lines (34 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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