From 2f70bd20d13ca699bf61cf2bb37881f029851275 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 7 Oct 2026 00:29:47 +0900 Subject: internal/workflows: fetch distribution artifact This is cleaner than contacting the cmd/mbf CI service on every run, although also slightly slower in some cases. Signed-off-by: Ophestra --- internal/workflows/step.go | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'internal/workflows/step.go') 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 && " + -- cgit v1.3.1