Example GitHub Action

This commit is contained in:
Iain Sproat
2023-03-20 16:01:47 +00:00
parent 83ac03f20e
commit 0eb31b2f6b
4 changed files with 44 additions and 2 deletions
+8
View File
@@ -0,0 +1,8 @@
# Container image that runs your code
FROM alpine:3.17.2
# 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"]
+16 -2
View File
@@ -8,9 +8,23 @@ This repository contains the source code for the Speckle Automate GitHub Action.
## Documentation
Comprehensive developer and user documentation can be found in our:
### Inputs
**📚 [Speckle Docs website](https://speckle.guide/dev/)**
#### `who-to-greet`
**Required** The name of the person to greet. Default `"World"`.
### Outputs
#### `time`
The time we greeted you.
### Example usage
uses: actions/speckle-automate-github-action@v2
with:
who-to-greet: 'Mona the Octocat'
## Developing & Debugging
+15
View File
@@ -0,0 +1,15 @@
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 }}
Executable
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh -l
echo "Hello $1"
time=$(date)
echo "time=$time" >> $GITHUB_OUTPUT