From 08981319e17fd425db1bf83836bc5c53aef49dcf Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Sat, 17 Aug 2024 17:21:28 +0100 Subject: [PATCH] add Dockerfile to pre-install mage --- .forgejo/actions/tests/Dockerfile | 14 ++++++++++++++ .forgejo/actions/tests/action.yaml | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .forgejo/actions/tests/Dockerfile diff --git a/.forgejo/actions/tests/Dockerfile b/.forgejo/actions/tests/Dockerfile new file mode 100644 index 0000000..2c92ef4 --- /dev/null +++ b/.forgejo/actions/tests/Dockerfile @@ -0,0 +1,14 @@ +# syntax=docker/dockerfile:1 +FROM golang:1.23.0 AS builder + +RUN git clone https://github.com/magefile/mage \ + && cd mage \ + && git checkout v1.15.0 \ + && go run bootstrap.go + + +FROM golang:1.23.0-alpine + +COPY --from=builder /go/bin/mage /go/bin/mage + +ENTRYPOINT ["mage"] diff --git a/.forgejo/actions/tests/action.yaml b/.forgejo/actions/tests/action.yaml index 3f19642..020e42f 100644 --- a/.forgejo/actions/tests/action.yaml +++ b/.forgejo/actions/tests/action.yaml @@ -3,9 +3,9 @@ name: "Testing" description: "Performs unit and lint tests for Enbas with mage" runs: using: "docker" - image: "docker://golang:1.23.0-alpine" + image: "Dockerfile" env: ENBAS_TEST_VERBOSE: "1" ENBAS_TEST_COVER: "1" pre-entrypoint: "go version" - entrypoint: "go run magefiles/main.go -v test" + entrypoint: "mage -v test"