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
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"]

View File

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

7
entrypoint.sh Normal file → Executable file
View File

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