Check for Raspbian image update #2
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: Check for Raspbian 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-raspbian-image: | |
| if: ${{ github.repository_owner == 'bitfocus' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| ref: ${{ env.COMPANION_PI_BRANCH }} | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".node-version" | |
| - name: Setup environment | |
| run: | | |
| corepack enable | |
| yarn | |
| - name: Run script | |
| run: | | |
| node tools/update_raspbian_image.mjs | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| commit-message: "chore: update Raspbian image" | |
| title: "chore: update Raspbian image" | |
| body: "This PR updates the Raspbian image." | |
| delete-branch: true | |
| branch: "chore/update-raspbian-image" | |
| committer: "Companion Bot <companion-module-bot@users.noreply.github.com>" | |
| author: "Companion Bot <companion-module-bot@users.noreply.github.com>" | |
| add-paths: | | |
| companionpi.pkr.hcl |