From bd7d01f6fe96c00324826a8f94cfb289d5363901 Mon Sep 17 00:00:00 2001 From: Tony Bogdanov Date: Wed, 13 May 2020 15:34:09 +0300 Subject: [PATCH] init --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ .idea/.gitignore | 2 ++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ .idea/zip.iml | 8 ++++++++ Dockerfile | 3 +++ LICENSE | 19 +++++++++++++++++++ README.md | 17 +++++++++++++++++ action.yaml | 9 +++++++++ 10 files changed, 100 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/zip.iml create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 action.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c5645e3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: build + +on: + push: + branches: [ master ] + +jobs: + build: + name: build + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Build and publish + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: tonybogdanov/zip + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..e7e9d11 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..ef004d1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a6afaf3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..9661ac7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/zip.iml b/.idea/zip.iml new file mode 100644 index 0000000..bf4c9d3 --- /dev/null +++ b/.idea/zip.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5de9073 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM alpine:3.10.1 + +RUN apk add zip diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..83e5069 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) Tony Bogdanov + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..48b202e --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +## Usage + +Add the following steps to your jobs: + +```yaml +- name: Compress + uses: tonybogdanov/zip@v1.0 + with: + args: zip -qq -r ./archive.zip ./target +``` + +```yaml +- name: Decompress + uses: tonybogdanov/zip@v1.0 + with: + args: unzip -qq ./archive.zip -d ./target +``` diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..052659c --- /dev/null +++ b/action.yaml @@ -0,0 +1,9 @@ +name: tonybogdanov-zip +author: Tony Bogdanov +description: GitHub action to zip/unzip files +branding: + color: blue + icon: check-square +runs: + using: docker + image: docker://tonybogdanov/zip:latest