mirror of https://github.com/openwrt/docker.git
ci: rebuild branch containers on a schedule
The rootfs, sdk and imagebuilder containers for the release branches are only rebuilt when someone triggers containers.yml by hand. The -openwrt-24.10 tags on Docker Hub were last pushed in December 2025 with kernel 6.6.119 baked in, while the 24.10-SNAPSHOT feeds have moved on to 6.6.151, so every runtime test in the packages CI fails with a 404 on the kmods feed. Add a schedule trigger: a scheduled run only dispatches the workflow for main and the maintained release branches and skips the build jobs. Going through workflow_dispatch keeps scheduled runs identical to manual ones, since a schedule event carries no ref input and the rest of the workflow is driven by it. GITHUB_TOKEN may create workflow_dispatch events, so no extra secrets are needed.pull/158/head
parent
ed4440d510
commit
09ba01ec8a
|
|
@ -11,6 +11,10 @@ env:
|
|||
on:
|
||||
# push:
|
||||
pull_request:
|
||||
schedule:
|
||||
# Rebuild the branch containers weekly so they do not drift away
|
||||
# from the published feeds; see the dispatch job below.
|
||||
- cron: "30 2 * * 1"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
|
|
@ -28,9 +32,25 @@ on:
|
|||
required: false
|
||||
|
||||
jobs:
|
||||
dispatch-scheduled-rebuilds:
|
||||
name: Dispatch scheduled rebuilds
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'schedule'
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- name: Trigger a run for each maintained branch
|
||||
run: |
|
||||
for ref in main openwrt-24.10 openwrt-25.12; do
|
||||
gh workflow run containers.yml --repo "$GITHUB_REPOSITORY" -f ref="$ref"
|
||||
done
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
generate_matrix:
|
||||
name: Set matrix
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'schedule'
|
||||
|
||||
outputs:
|
||||
imagebuilders: ${{ steps.find_targets.outputs.imagebuilders }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue