Skip to content

Upgrade buildroot

Upgrade buildroot #356

name: Upgrade buildroot
on:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
env:
BRANCH_NAME: buildroot-upgrade
jobs:
upgrade_buildroot:
if: ${{ github.event.repository.name == 'beepy-buildroot' }}
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv to manage Python
uses: astral-sh/setup-uv@v5
with:
version: "latest"
cache-dependency-glob: |
upgrade_scripts/*.py
- name: Upgrade buildroot
id: upgrade
run: |
set -o pipefail
./upgrade_scripts/git_checkout_or_create_branch.sh $BRANCH_NAME
uv run ./upgrade_scripts/upgrade_buildroot.py | tee -a $GITHUB_STEP_SUMMARY
echo "VERSION_UPDATED=$(jq -r '.version_updated' upgrade_scripts/upgrade_status.json)" >> $GITHUB_OUTPUT
shell: bash
- name: Commit modified files, push to Github, and create/update PR
run: |
git config user.name github-actions[bot]
git config user.email [email protected]
./upgrade_scripts/git_add_and_push.sh -c upgrade_scripts/upgrade_status.json
./upgrade_scripts/github_pr_create_or_update.sh -c upgrade_scripts/upgrade_status.json
env:
GH_TOKEN: ${{ github.token }}
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_REPOSITORY: ${{ github.repository }}
if: steps.upgrade.outputs.VERSION_UPDATED == 'true'