From 338436d855f785ca7f80b36c2d452f05a2717269 Mon Sep 17 00:00:00 2001 From: canastro Date: Sat, 4 Jan 2020 08:27:56 +0000 Subject: [PATCH] :tada: create repo --- .editorconfig | 8 ++++++++ .github/workflows/main.yml | 13 +++++++++++++ Dockerfile | 4 ++++ README.md | 20 ++++++++++++++++++++ action.yml | 14 ++++++++++++++ entrypoint.sh | 1 + tests/a.txt | 1 + 7 files changed, 61 insertions(+) create mode 100644 .editorconfig create mode 100644 .github/workflows/main.yml create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 action.yml create mode 100644 entrypoint.sh create mode 100644 tests/a.txt diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..73c5516 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +charset = utf-8 +trim_trailing_whitespace = false +insert_final_newline = false \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..dd4d70a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,13 @@ +name: copy files +on: [push] +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: copy file + uses: canastro/copy-file-action@master + with: + source: "tests/a.txt" + target: "test-a.txt" \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2814b00 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM debian:stable-slim +ADD entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..787e3bf --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +## Usage + +copy files and artifacts via SSH as blow. + +```yaml +name: copy files +on: [push] +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: copy file + uses: canastro/copy-file-action@master + with: + source: "tests/a.txt" + target: "test-a.txt" +``` diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..3f84e67 --- /dev/null +++ b/action.yml @@ -0,0 +1,14 @@ +name: 'Copy file' +description: 'Copy local files' +author: 'Ricardo Canastro' +inputs: + source: + description: 'Source file' + target: + description: 'Target file' +runs: + using: 'docker' + image: 'Dockerfile' +branding: + icon: 'copy' + color: 'green' \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..651e2ca --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1 @@ +cp $SOURCE $TARGET \ No newline at end of file diff --git a/tests/a.txt b/tests/a.txt new file mode 100644 index 0000000..6bdc878 --- /dev/null +++ b/tests/a.txt @@ -0,0 +1 @@ +Dummy file to test action \ No newline at end of file