-
Notifications
You must be signed in to change notification settings - Fork 7
62 lines (51 loc) · 1.58 KB
/
daily-update.yml
File metadata and controls
62 lines (51 loc) · 1.58 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Daily Signature Update
on:
schedule:
# Run daily at 6:00 UTC
- cron: '0 6 * * *'
workflow_dispatch: # Allow manual trigger
# Prevent concurrent runs from racing to commit/merge
# cancel-in-progress: false means new runs wait instead of canceling in-progress ones
concurrency:
group: daily-update
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout stable branch
uses: actions/checkout@v6
with:
ref: stable
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv sync
- name: Update signatures
env:
BBOT_IO_API_KEY: ${{ secrets.BBOT_IO_API_KEY }}
run: uv run python -m cloudcheck_update.cli
- name: Update README table
run: uv run python scripts/update_readme_table.py
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push to stable
if: steps.changes.outputs.has_changes == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add cloud_providers_v2.json README.md
git commit -m "chore: daily signature update $(date -u +%Y-%m-%d)"
git push origin HEAD:stable