Skip to content

Commit

Permalink
add docker args
Browse files Browse the repository at this point in the history
  • Loading branch information
canastro committed Jan 4, 2020
1 parent 401ba47 commit 7ddff6f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 2 additions & 5 deletions entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/bash
#!/bin/sh -l

set -e
set -o pipefail

sh -c "cp $*"
cp $1 $2

0 comments on commit 7ddff6f

Please sign in to comment.