Skip to content

Check for Raspberry Pi OS image update #3

Check for Raspberry Pi OS image update

Check for Raspberry Pi OS image update #3

name: Check for Raspberry Pi OS image update
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Run every week
schedule:
- cron: "43 5 * * 0"
env:
COMPANION_PI_BRANCH: main
permissions:
contents: write
pull-requests: write
jobs:
update-rpi-os-image:
if: ${{ github.repository_owner == 'bitfocus' }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
ref: ${{ env.COMPANION_PI_BRANCH }}
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: ".node-version"
- name: Setup environment
run: |
corepack enable
yarn
- name: Run script
run: |
node tools/update_rpi_os_image.mjs
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
commit-message: "chore: update Raspberry Pi OS image"
title: "chore: update Raspberry Pi OS image"
body: "This PR updates the Raspberry Pi OS image."
delete-branch: true
branch: "chore/update-raspberry-pi-os-image"
committer: "Companion Bot <companion-module-bot@users.noreply.github.com>"
author: "Companion Bot <companion-module-bot@users.noreply.github.com>"
sign-commits: true
add-paths: |
companionpi.pkr.hcl