diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e784761..daba185 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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"] diff --git a/.github/workflows/refresh.yml b/.github/workflows/refresh.yml index b35890f..9d34537 100644 --- a/.github/workflows/refresh.yml +++ b/.github/workflows/refresh.yml @@ -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 diff --git a/Taskfile.yml b/Taskfile.yml index 5281e33..680d651 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -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-), 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-), 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 diff --git a/versions.yaml b/versions.yaml index 3238f70..88b4ce4 100644 --- a/versions.yaml +++ b/versions.yaml @@ -75,9 +75,9 @@ on the kernel it was saved with (machine.Spec.Fingerprint). The configuration is the series', kernel/config-.-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