diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..273d50c --- /dev/null +++ b/action.yml @@ -0,0 +1,11 @@ +name: 'YAML processor' +description: 'YAML processor for running in Github action' +inputs: + cmd: + description: 'The Command which should be run' + required: true +runs: + using: 'docker' + image: 'github-action/Dockerfile' + args: + - ${{ inputs.cmd }} diff --git a/github-action/Dockerfile b/github-action/Dockerfile new file mode 100644 index 0000000..ddf7c6e --- /dev/null +++ b/github-action/Dockerfile @@ -0,0 +1,5 @@ +FROM mikefarah/yq:3 + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/github-action/entrypoint.sh b/github-action/entrypoint.sh new file mode 100755 index 0000000..af5e6ab --- /dev/null +++ b/github-action/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh -l + +echo "$1" +eval $1