From 968255a5b25e4681893b1c39072499086ddd200a Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Tue, 27 Aug 2024 18:48:26 +0100 Subject: [PATCH] feat: add action --- Dockerfile | 6 ++++++ LICENSE | 2 +- action.yaml | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 action.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ac36f20 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +# syntax=docker/dockerfile:1 +FROM golang:1.23.0 + +RUN go install github.com/magefile/mage@v1.15.0 + +ENTRYPOINT ["mage"] diff --git a/LICENSE b/LICENSE index 9528422..3e2212e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 actions +Copyright (c) 2024 Dan Anglin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..4354385 --- /dev/null +++ b/action.yaml @@ -0,0 +1,16 @@ +--- +name: "Mage CI Action" +description: "Runs a mage target defined in your project's repository" + +inputs: + target: + description: "The mage target to run" + required: true + +runs: + using: "docker" + image: "Dockerfile" + entrypoint: "mage" + args: + - -v + - ${{ inputs.target }}