diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-07 00:29:47 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-07 00:49:55 +0900 |
| commit | 2f70bd20d13ca699bf61cf2bb37881f029851275 (patch) | |
| tree | 093d5e5348116d02efb61b6c3280204ca94fb042 /internal/workflows/step.go | |
| parent | a6334d4ff69ce0c02128256f2032617096882ee5 (diff) | |
This is cleaner than contacting the cmd/mbf CI service on every run,
although also slightly slower in some cases.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/workflows/step.go')
| -rw-r--r-- | internal/workflows/step.go | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/internal/workflows/step.go b/internal/workflows/step.go index 17ca25e1..fc95fd69 100644 --- a/internal/workflows/step.go +++ b/internal/workflows/step.go @@ -52,11 +52,35 @@ func newCIRequest(display, name, id string) Step { } } +// download is a step to obtain a hakurei distribution. +var download = Step{ + Name: "Download hakurei distribution", + ID: "download", + Uses: "actions/download-artifact@v3", + + With: []KV[any]{ + {"name", "dist-${{ needs.dist.outputs.rev }}"}, + {"path", "result"}, + }, +} + +// _download is like download, but with race instrument. +var _download = Step{ + Name: "Download hakurei distribution", + ID: "download", + Uses: "actions/download-artifact@v3", + + With: []KV[any]{ + {"name", "dist-${{ needs.dist-race.outputs.rev }}-race"}, + {"path", "result"}, + }, +} + // install is a step to unpack and deploy a hakurei distribution created by a // step with identifier dist. var install = Step{ Name: "Install hakurei", - Run: "HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)-${{ steps.dist.outputs.rev }}\" && " + + Run: "HAKUREI_VERSION=\"$(cat cmd/dist/VERSION)\" && " + "tar xf result/hakurei-$HAKUREI_VERSION*-amd64.tar.gz && " + "./hakurei-$HAKUREI_VERSION*-amd64/install.sh && " + "sudo -u ubuntu hakurei version && " + |
