commit 80c6c8e7edc333b7357391c367801be668e7df50 Author: cupcakearmy Date: Sun Dec 13 12:14:35 2020 +0100 test diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6ab789d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,15 @@ +on: [push] + +jobs: + hello_world_job: + runs-on: ubuntu-latest + name: A job to say hello + steps: + - name: Hello world action step + id: hello + uses: actions/hello-world-docker-action@v1 + with: + who-to-greet: 'Mona the Octocat' + # Use the output from the `hello` step + - name: Get the output time + run: echo "The time was ${{ steps.hello.outputs.time }}" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..30bc162 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/node_modules \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fa0188a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +# Container image that runs your code +FROM alpine:3.10 + +# 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/action.yml b/action.yml new file mode 100644 index 0000000..782c830 --- /dev/null +++ b/action.yml @@ -0,0 +1,16 @@ +# action.yml +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' + args: + - ${{ inputs.who-to-greet }} diff --git a/entrypoint b/entrypoint new file mode 100755 index 0000000..e33ed46 --- /dev/null +++ b/entrypoint @@ -0,0 +1,5 @@ +#!/bin/sh -l + +echo "Hello $1" +time=$(date) +echo "::set-output name=time::$time" \ No newline at end of file