├── entrypoint.sh ├── Dockerfile ├── README.md ├── LICENSE └── .github └── workflows └── push.yml /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | sh -c "s3cmd --no-check-certificate --access_key=$ACCESS_KEY --secret_key=$SECRET_KEY --verbose --human-readable-sizes --stop-on-error $*" 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:xenial 2 | 3 | LABEL "name"="s3cmd" 4 | LABEL "maintainer"="Jusbrasil Dev Team " 5 | LABEL "version"="1.0.0" 6 | 7 | LABEL "com.github.actions.name"="s3cmd for GitHub Actions" 8 | LABEL "com.github.actions.description"="Runs s3cmd in an Action" 9 | LABEL "com.github.actions.icon"="upload-cloud" 10 | LABEL "com.github.actions.color"="green" 11 | 12 | COPY LICENSE README.md / 13 | 14 | COPY entrypoint.sh /entrypoint.sh 15 | 16 | RUN apt-get update -y && \ 17 | apt-get install -y --no-install-recommends s3cmd && \ 18 | rm -rf /var/lib/apt/lists/* && \ 19 | apt-get clean -y 20 | 21 | ENTRYPOINT ["/entrypoint.sh"] 22 | CMD ["--help"] 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # s3cmd 2 | 3 | ## Usage 4 | 5 | Executes s3cmd with arguments listed in the Action's `args`. 6 | 7 | ``` 8 | action "Shell" { 9 | uses = "jusbrasil/github-action-s3cmd@master" 10 | args = ["ls"] 11 | secrets = ["ACCESS_KEY", "SECRET_KEY"] 12 | } 13 | ``` 14 | 15 | Or with docker image: 16 | 17 | ``` 18 | action "Shell" { 19 | uses = "docker://jusbrasil/s3cmd-action:master" 20 | args = ["ls"] 21 | secrets = ["ACCESS_KEY", "SECRET_KEY"] 22 | } 23 | ``` 24 | 25 | ### Secrets 26 | 27 | * `ACCESS_KEY` AWS Access Key 28 | * `SECRET_KEY` AWS Secret Key 29 | 30 | ## License 31 | 32 | The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE). 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 GitHub, Inc. and contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/push.yml: -------------------------------------------------------------------------------- 1 | on: push 2 | name: Build and Publish 3 | jobs: 4 | dockerLint: 5 | name: Docker Lint 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@master 9 | - name: Docker Lint 10 | uses: docker://replicated/dockerfilelint 11 | with: 12 | args: Dockerfile 13 | - name: Shell Lint 14 | uses: actions/bin/shellcheck@master 15 | with: 16 | args: entrypoint.sh 17 | - name: Publish Filter 18 | uses: actions/bin/filter@master 19 | with: 20 | args: branch master 21 | - name: Build 22 | uses: actions/docker/cli@master 23 | with: 24 | args: build -t s3cmd-action . 25 | - name: Docker Login 26 | uses: actions/docker/login@master 27 | env: 28 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 29 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 30 | - name: Docker Tag 31 | uses: actions/docker/tag@master 32 | with: 33 | args: s3cmd-action jusbrasil/s3cmd-action --no-latest 34 | - name: Docker Run 35 | uses: actions/docker/cli@master 36 | with: 37 | args: run -t s3cmd-action 38 | - name: Docker Publish 39 | uses: actions/docker/cli@master 40 | with: 41 | args: push jusbrasil/s3cmd-action 42 | --------------------------------------------------------------------------------