Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7480b04a91 | |||
| cc5ebe707c | |||
| 0aa892ad33 | |||
| 3e90df75b7 | |||
| f58e89de52 | |||
| 2d8896e903 | |||
| 263c01beed | |||
| ef858630b7 | |||
| 496e37fe2e | |||
| 78dc2c527b | |||
| 1e5c0c6cf0 | |||
| 2b331cc43b | |||
| c39aec0850 |
@@ -10,5 +10,5 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: pre-commit/action@v3.0.0
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: pre-commit/action@v3.0.1
|
||||
|
||||
@@ -32,15 +32,10 @@ Please note that this is not a Speckle Account token, but a **Speckle Automate A
|
||||
|
||||
Your Speckle Token must have write permissions for the Speckle Function with this ID, otherwise the publish will fail.
|
||||
|
||||
#### `speckle_function_path`
|
||||
|
||||
The path to the Speckle Automate Function to publish. This path is relative to the root of the repository. If you provide a path to a directory, your Speckle Automate Function must be in a file named `specklefunction.yaml` within that directory.
|
||||
|
||||
Defaults to the root of the repository.
|
||||
|
||||
#### `speckle_function_input_schema`
|
||||
#### `speckle_function_input_schema_file_path`
|
||||
|
||||
The path to a file containing a JSON Schema. This JSON Schema defines the parameters required by the Function. The JSON Schema will be used to automatically create the User Interface displayed to users of your Function in Speckle Automate. Users will be able to provide their data to customise the Function.
|
||||
This can be an absolute path, or a path relative to the Home directory of the GitHub Action runner.
|
||||
|
||||
Defaults to `./input-schema.json`
|
||||
|
||||
@@ -97,8 +92,9 @@ This GitHub Action does not have any outputs. Please instead inspect the logs to
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Register, Build, and Publish a Speckle Function
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5 # <-- CONFIGURE CHECKOUT FOR YOUR CODE
|
||||
- name: Register, Build, and Publish a Speckle Function
|
||||
uses: specklesystems/speckle-automate-github-composite-action
|
||||
with:
|
||||
speckle_token: ${{ secrets.SPECKLE_FUNCTION_PUBLISH_TOKEN }}
|
||||
|
||||
+7
-4
@@ -38,7 +38,6 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/checkout@v4 # checkout the repository in which this GitHub Action is being used.
|
||||
- name: Validate inputs
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -78,8 +77,10 @@ runs:
|
||||
|
||||
echo "Setting the function's releaseTag to: ${RELEASE_TAG}"
|
||||
echo "releaseTag=${RELEASE_TAG}" >> "$GITHUB_ENV"
|
||||
- name: Set up Docker Buildx # required to enable caching of docker build
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Log in to Speckle Automate Docker registry
|
||||
uses: docker/login-action@v3.0.0
|
||||
uses: docker/login-action@v3.1.0
|
||||
with:
|
||||
registry: ${{ inputs.speckle_automate_url }}
|
||||
username: ${{ inputs.speckle_token }}
|
||||
@@ -101,15 +102,17 @@ runs:
|
||||
exit 1
|
||||
fi
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5.0.0
|
||||
uses: docker/build-push-action@v5.3.0
|
||||
with:
|
||||
context: ${{ inputs.docker_context }}
|
||||
file: ${{ inputs.dockerfile_path }}
|
||||
tags: ${{ env.automateHost }}/${{ inputs.speckle_function_id }}:${{ env.releaseTag }}
|
||||
target: ''
|
||||
push: true
|
||||
cache-from: type=registry,ref=${{ env.automateHost }}/${{ inputs.speckle_function_id }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.automateHost }}/${{ inputs.speckle_function_id }}:buildcache,mode=max
|
||||
- name: Speckle Automate function version publisher
|
||||
uses: specklesystems/speckle-automate-github-action@0.7.1
|
||||
uses: specklesystems/speckle-automate-github-action@0.10.0
|
||||
id: register_speckle_function_version
|
||||
with:
|
||||
speckle_automate_url: ${{ inputs.speckle_automate_url }}
|
||||
|
||||
Reference in New Issue
Block a user