# Check for upstream Talos and RPi kernel updates # # Runs on a schedule and creates a Gitea issue when new versions are found. # This is notification-only — builds require manual tag push after verifying # patches still apply. name: Check Upstream Updates on: schedule: # Run weekly on Monday at 08:00 UTC - cron: '0 8 * * 1' workflow_dispatch: jobs: check-updates: runs-on: [self-hosted, macOS, arm64] timeout-minutes: 10 steps: - name: Checkout uses: actions/checkout@v4 - name: Check for upstream updates id: check run: | chmod +x scripts/check-upstream.sh scripts/check-upstream.sh >> "$GITHUB_OUTPUT" - name: Create issue for Talos update if: steps.check.outputs.talos_update == 'true' uses: actions/github-script@v7 with: script: | const currentVersion = '${{ steps.check.outputs.talos_current }}'; const latestVersion = '${{ steps.check.outputs.talos_latest }}'; const title = `Talos update available: ${currentVersion} → ${latestVersion}`; // Check if an open issue already exists const issues = await github.rest.issues.listForRepo({ owner: context.repo.owner, repo: context.repo.repo, state: 'open', labels: 'upstream-update', }); const existing = issues.data.find(i => i.title.includes('Talos update')); if (existing) { console.log(`Issue already exists: #${existing.number}`); return; } await github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, title: title, body: [ `## Talos Update Available`, ``, `| | Version |`, `|---|---|`, `| Current | \`${currentVersion}\` |`, `| Latest | \`${latestVersion}\` |`, ``, `### Steps`, `1. Update \`TALOS_VERSION\` in \`Makefile\``, `2. Verify patches still apply: \`make checkouts patches\``, `3. If patches fail, port them to the new version`, `4. Push a version tag to trigger the build pipeline`, ``, `### Links`, `- [Talos Release Notes](https://github.com/siderolabs/talos/releases/tag/${latestVersion})`, ].join('\n'), labels: ['upstream-update', 'talos'], }); - name: Create issue for RPi kernel update if: steps.check.outputs.rpi_update == 'true' uses: actions/github-script@v7 with: script: | const currentVersion = '${{ steps.check.outputs.rpi_current }}'; const latestVersion = '${{ steps.check.outputs.rpi_latest }}'; const title = `RPi kernel update available: ${currentVersion} → ${latestVersion}`; const issues = await github.rest.issues.listForRepo({ owner: context.repo.owner, repo: context.repo.repo, state: 'open', labels: 'upstream-update', }); const existing = issues.data.find(i => i.title.includes('RPi kernel update')); if (existing) { console.log(`Issue already exists: #${existing.number}`); return; } await github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, title: title, body: [ `## RPi Kernel Update Available`, ``, `| | Version |`, `|---|---|`, `| Current (in pkgs patch) | \`${currentVersion}\` |`, `| Latest stable | \`${latestVersion}\` |`, ``, `### Steps`, `1. Update the kernel version in the pkgs patch`, `2. Verify the patch still applies: \`make checkouts patches\``, `3. Test build: \`make kernel\``, `4. Push a version tag to trigger the full build pipeline`, ``, `### Links`, `- [RPi Linux Releases](https://github.com/raspberrypi/linux/tags)`, ].join('\n'), labels: ['upstream-update', 'kernel'], });