├── README.md ├── entrypoint.sh ├── Dockerfile └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | ## bash 2 | 3 | ### Usage 4 | 5 | Executes each command listed in the Action's args via bash -c. 6 | 7 | ```shell 8 | action "Setup" { 9 | uses = "jcblw/bash@master" 10 | args = ["cat <<<$MY_VAR > file.csv"] 11 | } 12 | ``` 13 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for cmd in "$@"; do 4 | echo "Running '$cmd'..." 5 | if bash -c "$cmd"; then 6 | # no op 7 | echo "Successfully ran '$cmd'" 8 | else 9 | exit_code=$? 10 | echo "Failure running '$cmd', exited with $exit_code" 11 | exit $exit_code 12 | fi 13 | done 14 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stable-slim 2 | 3 | LABEL "name"="bash" 4 | LABEL "maintainer"="Jacob Lowe " 5 | LABEL "version"="1.0.0" 6 | 7 | LABEL "com.github.actions.name"="Bash for GitHub Actions" 8 | LABEL "com.github.actions.description"="Runs one or more commands in an Action" 9 | LABEL "com.github.actions.icon"="terminal" 10 | LABEL "com.github.actions.color"="gray-dark" 11 | 12 | COPY LICENSE README.md / 13 | 14 | COPY entrypoint.sh /entrypoint.sh 15 | ENTRYPOINT ["/entrypoint.sh"] 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 Jacob Lowe 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 | --------------------------------------------------------------------------------