From da398765b847b46a3163a442d8b012a801f5b724 Mon Sep 17 00:00:00 2001 From: Pascal Sochacki Date: Mon, 24 Feb 2020 10:04:45 +0100 Subject: [PATCH] added files for github action --- action.yml | 11 +++++++++++ github-action/Dockerfile | 5 +++++ github-action/entrypoint.sh | 4 ++++ 3 files changed, 20 insertions(+) create mode 100644 action.yml create mode 100644 github-action/Dockerfile create mode 100755 github-action/entrypoint.sh 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