Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ updates:
rebase-strategy: disabled
cooldown:
default-days: 7
# go-tools is ours: a release of it reaches every repository the week it is made.
exclude: ["github.com/spin-stack/go-tools"]
4 changes: 4 additions & 0 deletions .github/workflows/refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ jobs:

- name: Propose the kernel's newest release
env:
# versions refresh opens the pull request as GITHUB_TOKEN before GH_TOKEN, and the run's
# own, set above, can neither open it nor start the checks on it; git pushes through gh,
# as GH_TOKEN.
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
GH_TOKEN: ${{ steps.app.outputs.token }}
run: go tool task refresh:kernel

Expand Down
25 changes: 5 additions & 20 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -869,28 +869,13 @@ tasks:

# Most of what a stable release fixes is fixed before it is called a CVE, so the kernel is only
# as current as the last time somebody looked: refresh.yml asks every day. Within the pinned
# series and never past it (versions.yaml's kernel note). A version already proposed is not
# proposed again, closed or not: a person who closed it said no to that release.
# series and never past it (versions.yaml's kernel note, which is also the pull request's
# "check before merging"). The branch is named for versions.yaml's sum, so a set proposed once
# is not proposed again, closed or not: a person who closed it said no to that release.
refresh:kernel:
desc: Propose the newest release of the kernel's series as a pull request (refresh/kernel-<version>), closing the one it supersedes; nothing when the pin is current or that version was proposed already.
env:
BODY: >-
The newest release of the pinned kernel series, proposed by refresh.yml. kernel.yml builds
it on this pull request. Before merging, boot it: `task kernel:build boot:ssh-first`.
desc: Propose the newest release of the kernel's series as a pull request (refresh/kernel-<sum>), closing the one it supersedes; nothing when the pin is current or that version was proposed already.
cmds:
- |
set -euo pipefail
{{.VERSIONS}} bump kernel
if git diff --quiet -- versions.yaml; then echo "the kernel is current" | tee -a "${GITHUB_STEP_SUMMARY:-/dev/null}"; exit 0; fi
v=$({{.VERSIONS}} version kernel); branch="refresh/kernel-$v"
if git ls-remote --exit-code --heads origin "$branch" >/dev/null; then echo "$branch was proposed already"; exit 0; fi
git switch -c "$branch"
git commit -q -m "versions: kernel $v" -- versions.yaml
git push origin "$branch"
url=$(gh pr create --base main --head "$branch" --title "versions: kernel $v" --body "$BODY")
echo "$url" | tee -a "${GITHUB_STEP_SUMMARY:-/dev/null}"
gh pr list --state open --json number,headRefName --jq ".[] | select((.headRefName | startswith(\"refresh/kernel-\")) and .headRefName != \"$branch\") | .number" |
while read -r n; do gh pr close "$n" --delete-branch --comment "Superseded by $url."; done
- '{{.VERSIONS}} refresh -propose -label kernel kernel'

# The apk locks go stale without anyone touching them: the pinned Alpine's mirror serves only the
# newest build of each package, so a lock that resolved yesterday fails a build today (`unable to
Expand Down
6 changes: 3 additions & 3 deletions versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
on the kernel it was saved with (machine.Spec.Fingerprint). The configuration
is the series', kernel/config-<major>.<minor>-x86_64, so a release within the series moves
this entry and nothing else: refresh.yml proposes it every day, and kernel.yml builds it on
the pull request. A new series renames the configuration in the same commit, then
`task kernel:build`, `task boot:ssh-first`. The series is a person's choice, the same as
spin-ami's host kernel.
the pull request; before merging, boot it: `task kernel:build boot:ssh-first`. A new series
renames the configuration in the same commit, then `task kernel:build`, `task
boot:ssh-first`. The series is a person's choice, the same as spin-ami's host kernel.

- name: debian
kind: image
Expand Down
Loading