Upgrade buildroot #346
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |