summaryrefslogtreecommitdiffstats
path: root/pkg/runner/testdata/actions/docker-local
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/runner/testdata/actions/docker-local')
-rw-r--r--pkg/runner/testdata/actions/docker-local/Dockerfile8
-rw-r--r--pkg/runner/testdata/actions/docker-local/action.yml17
-rwxr-xr-xpkg/runner/testdata/actions/docker-local/entrypoint.sh8
3 files changed, 33 insertions, 0 deletions
diff --git a/pkg/runner/testdata/actions/docker-local/Dockerfile b/pkg/runner/testdata/actions/docker-local/Dockerfile
new file mode 100644
index 0000000..47bc119
--- /dev/null
+++ b/pkg/runner/testdata/actions/docker-local/Dockerfile
@@ -0,0 +1,8 @@
+# Container image that runs your code
+FROM node:16-buster-slim
+
+# 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"]
diff --git a/pkg/runner/testdata/actions/docker-local/action.yml b/pkg/runner/testdata/actions/docker-local/action.yml
new file mode 100644
index 0000000..5d3ce62
--- /dev/null
+++ b/pkg/runner/testdata/actions/docker-local/action.yml
@@ -0,0 +1,17 @@
+name: 'Hello World'
+description: 'Greet someone and record the time'
+inputs:
+ who-to-greet: # id of input
+ description: 'Who to greet'
+ required: true
+ default: 'World'
+outputs:
+ time: # id of output
+ description: 'The time we greeted you'
+runs:
+ using: 'docker'
+ image: 'Dockerfile'
+ env:
+ WHOAMI: ${{ inputs.who-to-greet }}
+ args:
+ - ${{ inputs.who-to-greet }}
diff --git a/pkg/runner/testdata/actions/docker-local/entrypoint.sh b/pkg/runner/testdata/actions/docker-local/entrypoint.sh
new file mode 100755
index 0000000..43ca2dd
--- /dev/null
+++ b/pkg/runner/testdata/actions/docker-local/entrypoint.sh
@@ -0,0 +1,8 @@
+#!/bin/sh -l
+
+echo "Hello $1"
+time=$(date)
+echo ::set-output name=time::$time
+echo ::set-output name=whoami::$WHOAMI
+
+echo "SOMEVAR=$1" >>$GITHUB_ENV