add docker args

This commit is contained in:
canastro 2020-01-04 10:29:34 +00:00
parent 401ba47007
commit 7ddff6fc15
3 changed files with 13 additions and 7 deletions

View File

@ -1,4 +1,8 @@
# Container image that runs your code
FROM alpine:latest FROM alpine:latest
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh # Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]

View File

@ -4,11 +4,16 @@ author: 'Ricardo Canastro'
inputs: inputs:
source: source:
description: 'Source file' description: 'Source file'
required: true
target: target:
description: 'Target file' description: 'Target file'
required: true
runs: runs:
using: 'docker' using: 'docker'
image: 'Dockerfile' image: 'Dockerfile'
args:
- ${{inputs.source}}
- ${{inputs.target}}
branding: branding:
icon: 'copy' icon: 'copy'
color: 'green' color: 'green'

7
entrypoint.sh Normal file → Executable file
View File

@ -1,6 +1,3 @@
#!/bin/bash #!/bin/sh -l
set -e cp $1 $2
set -o pipefail
sh -c "cp $*"