mirror of
https://github.com/canastro/copy-action.git
synced 2024-11-27 06:03:50 +08:00
add docker args
This commit is contained in:
parent
401ba47007
commit
7ddff6fc15
@ -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"]
|
@ -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
7
entrypoint.sh
Normal file → Executable file
@ -1,6 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh -l
|
||||||
|
|
||||||
set -e
|
cp $1 $2
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
sh -c "cp $*"
|
|
Loading…
Reference in New Issue
Block a user