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"