Repository navigation
155 lines (136 loc) · 5.88 KB
/
Copy pathrefresh.yml
File metadata and controls
155 lines (136 loc) · 5.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Every day, the newest release of the guest kernel's series, proposed as a pull request
# (task refresh:kernel). A stable release is mostly fixes that were never called CVEs, or were
# called one after the fix was out, so taking them is the cheapest security this machine has:
# within the series the configuration does not change (kernel/config-<series>-x86_64) and
# checkpoints keep resuming, so a stable release is one versions.yaml line. kernel.yml builds it
# on the pull request; a person boots it and merges it. Nothing here publishes.
#
# And the systemd source package the image rebuilds (task refresh:systemd), which the archive
# stops serving the day Ubuntu replaces it.
#
# And the apk locks of QEMU's and e2fsprogs' builders (task refresh:apk), because the pinned
# Alpine's mirror drops the builds they name and a stale lock fails the next build - a release
# found that three times. qemu.yml and image.yml build the pull request.
#
# The pull request is the release app's (spin-stack-release), so the checks on it run: one opened
# with this run's own token would start none.
name: Refresh
on:
schedule:
- cron: "41 6 * * *"
workflow_dispatch:
concurrency:
group: refresh
cancel-in-progress: false
permissions:
contents: read
# As ci.yml: go-tools' downloads ask GitHub with it, which sheds anonymous ones first.
env:
GITHUB_TOKEN: ${{ github.token }}
jobs:
kernel:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
id: app
with:
client-id: Iv23licJKNgsPIM00SD0 # spin-stack-release's client ID, public: app-id is deprecated
private-key: ${{ secrets.RELEASE_APP_KEY }}
owner: spin-stack
repositories: spin-machine
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The branch is pushed as the app, below, and not with this run's token.
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
- name: Commit as the app
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
APP_SLUG: ${{ steps.app.outputs.app-slug }}
run: go tool task git:app
- 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
# Its own job, as apk's: the refresh leaves the checkout on the branch it proposed. Ubuntu's
# archive serves only the systemd source resolute publishes now, so image/systemd fails to build
# from the day it moves until the pin follows; this proposes the move that day. image.yml builds
# the pull request.
systemd:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
id: app
with:
client-id: Iv23licJKNgsPIM00SD0 # spin-stack-release's client ID, public: app-id is deprecated
private-key: ${{ secrets.RELEASE_APP_KEY }}
owner: spin-stack
repositories: spin-machine
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The branch is pushed as the app, below, and not with this run's token.
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
- name: Commit as the app
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
APP_SLUG: ${{ steps.app.outputs.app-slug }}
run: go tool task git:app
- name: Propose the systemd resolute publishes now
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:systemd
# Its own job: each refresh above leaves the checkout on the branch it proposed.
apk:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
id: app
with:
client-id: Iv23licJKNgsPIM00SD0 # spin-stack-release's client ID, public: app-id is deprecated
private-key: ${{ secrets.RELEASE_APP_KEY }}
owner: spin-stack
repositories: spin-machine
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The branch is pushed as the app, below, and not with this run's token.
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
- name: Commit as the app
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
APP_SLUG: ${{ steps.app.outputs.app-slug }}
run: go tool task git:app
- name: Propose the apk locks at what the mirror has today
env:
GH_TOKEN: ${{ steps.app.outputs.token }}
run: go tool task refresh:apk