Skip to content

Daily Signature Update #5

Daily Signature Update

Daily Signature Update #5

Workflow file for this run

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
pull-requests: write
steps:
- name: Checkout stable branch
uses: actions/checkout@v6
with:
ref: stable
- name: Create temporary update branch
run: |
git checkout -b update/daily-$(date -u +%Y-%m-%d)
- 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 create PR
if: steps.changes.outputs.has_changes == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH="update/daily-$(date -u +%Y-%m-%d)"
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)"
# Delete remote branch if it exists from a previous failed run
git push origin --delete "$BRANCH" 2>/dev/null || true
git push origin "$BRANCH"
gh pr create --base stable --head "$BRANCH" \
--title "chore: daily signature update $(date -u +%Y-%m-%d)" \
--body "Automated daily update of cloud provider signatures and README table."
gh pr merge "$BRANCH" --auto --squash --delete-branch