From d17570f57408001d7be982ccfcbd1b1ec3d28168 Mon Sep 17 00:00:00 2001 From: cpina Date: Sun, 29 Mar 2020 16:44:47 +0200 Subject: [PATCH] Testing github action --- Dockerfile | 5 +++++ README.md | 14 +++++++++++++- action.yml | 19 +++++++++++++++++++ entrypoint.sh | 7 +++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 action.yml create mode 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5f5e0ef --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM alpine:3.10 + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/README.md b/README.md index 7eb106d..9973613 100644 --- a/README.md +++ b/README.md @@ -1 +1,13 @@ -# github-action-push-to-another-repository \ No newline at end of file +# github-action-push-to-another-repository + +Helps to push generated files to another directory + +## Inputs +### `source-folder` + +### `destination-github-username` + +### `destination-repository-name` + +## Example usage +uses: actions/... TODO diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..c946726 --- /dev/null +++ b/action.yml @@ -0,0 +1,19 @@ +name: 'Push directory to another repository' +description: 'Useful to push files to another repository to be used, for example, via github pages' +inputs: + source-directory: + description: 'Source directory from the origin directory' + required: true + destination-github-username: + description: 'Name of the destination username/organization' + required: true + destination-repository-name: + description: 'Destination repository' + required: true +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.source-directory }} + - ${{ inputs.destination-github-username }} + - ${{ inputs.destination-repository-name }} diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..9a43873 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/sh -l + +echo "Starts" +echo "1: $1" +echo "2: $2" +echo "3: $3" +echo "Ends