Example GitHub Action
This commit is contained in:
@@ -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"]
|
||||
@@ -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
@@ -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
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
echo "Hello $1"
|
||||
time=$(date)
|
||||
echo "time=$time" >> $GITHUB_OUTPUT
|
||||
Reference in New Issue
Block a user