diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-09-30 19:20:03 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-09-30 19:20:03 +0900 |
| commit | 0536c9729c30f25d82f1b1284976ba284d596779 (patch) | |
| tree | db5e57482ca0000b1c079190cf2e5d356b43f448 /internal/workflows/step.go | |
| parent | 815f40c944281ca9a9a68aa612336b13098958c1 (diff) | |
internal/workflows: request dist via cmd/mbfwip-ci
This replaces the nix-based dist step.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/workflows/step.go')
| -rw-r--r-- | internal/workflows/step.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/workflows/step.go b/internal/workflows/step.go index d09e047e..2f283a46 100644 --- a/internal/workflows/step.go +++ b/internal/workflows/step.go @@ -5,6 +5,16 @@ package main // checkout is the standard actions/checkout step. var checkout = Step{Name: "Checkout", Uses: "actions/checkout@v4"} +// clone is a simple actions/checkout replacement. +var clone = Step{ + Name: "Checkout", + Run: "git clone " + + "-c advice.detachedHead=0 " + + "--rev='${{ github.sha }}' " + + "'${{ github.server_url }}/${{ github.repository }}.git' . && " + + "git fetch --tags", +} + // newUploadArtifact returns an actions/upload-artifact step uploading // everything in the result directory as the specified name. func newUploadArtifact(display, name string) Step { @@ -21,6 +31,17 @@ func newUploadArtifact(display, name string) Step { } } +// newCIRequest returns a step for requesting a mbf CI task. +func newCIRequest(display, name, id string) Step { + return Step{ + Name: "Request " + display, + ID: id, + Run: "export HAKUREI_VERSION=\"$(git describe --dirty)\" && " + + "/rosa/bin/mbf ci " + name + " . \"$HAKUREI_VERSION\" && " + + "echo \"version=$HAKUREI_VERSION\" >> \"$GITHUB_OUTPUT\"", + } +} + // newNixOSTest returns a step for running the named NixOS test. func newNixOSTest(name string) Step { return Step{ |
