2 Commits

Author SHA1 Message Date
Gergő Jedlicska d742e579eb remove speckle function path 2023-08-07 16:38:26 +02:00
Gergő Jedlicska 5af60941ce Update action.yaml 2023-08-07 15:59:36 +02:00
6 changed files with 5 additions and 23 deletions
+4 -8
View File
@@ -1,21 +1,17 @@
name: 'Speckle Automate Function Publisher'
description: 'Builds and publishes a Speckle Automate Function to the Speckle Server.'
name: 'Speckle Automate function version publisher'
description: 'Publishes a new version of a Speckle Automate Function to the Speckle Automate platform.'
author: 'Speckle Systems'
branding:
icon: 'upload-cloud'
color: 'blue'
inputs:
speckle_automate_url:
description: 'Speckle Automate Server URL.'
description: 'Speckle Automate URL.'
required: false
default: 'https://automate.speckle.dev'
speckle_token:
description: 'Token for authentication to Speckle Automate Server, allowing publishing of Speckle Functions. **The token must be stored in GitHub as an encrypted secret**.'
description: 'Token for authentication to Speckle Automate, allowing publishing of Speckle Automate Functions. **The token must be stored in GitHub as an encrypted secret**.'
required: true
speckle_function_path:
description: 'Path to the Speckle Function definition (`specklefunction.yaml`) to be published.'
required: false
default: '.' # root directory of the checked out source code, ${GITHUB_WORKSPACE}
speckle_function_id:
description: 'The unique identifier of the function. Go to automate to generate one.'
required: true
Generated Vendored
-5
View File
@@ -18252,7 +18252,6 @@ class NonRetryableError extends Error {
async function registerSpeckleFunction(opts) {
let speckleServerUrl;
let speckleToken;
let speckleFunctionPath;
let speckleFunctionId;
let speckleFunctionCommand;
let speckleFunctionInputSchema;
@@ -18261,7 +18260,6 @@ async function registerSpeckleFunction(opts) {
try {
speckleServerUrl = SpeckleServerUrlSchema.parse(opts.speckleServerUrl);
speckleToken = SpeckleTokenSchema.parse(opts.speckleToken);
speckleFunctionPath = SpeckleFunctionPathSchema.parse(opts.speckleFunctionPath);
speckleFunctionId = SpeckleFunctionIdSchema.parse(opts.speckleFunctionId);
versionTag = VersionTagSchema.parse(opts.versionTag);
commitId = CommitIdSchema.parse(opts.commitId);
@@ -18275,7 +18273,6 @@ async function registerSpeckleFunction(opts) {
}
opts.logger.info(`Speckle Server URL: '${speckleServerUrl}'`);
//token is masked in the logs, so no need to print it here.
opts.logger.info(`Speckle Function Path: '${speckleFunctionPath}'`);
opts.logger.info(`Speckle Function ID: '${speckleFunctionId}'`);
// const manifest = await findAndParseManifest(speckleFunctionPath, {
// logger: opts.logger,
@@ -22167,7 +22164,6 @@ async function run() {
const speckleAutomateUrlRaw = core.getInput('speckle_automate_url');
const speckleTokenRaw = core.getInput('speckle_token');
core.setSecret(speckleTokenRaw);
const speckleFunctionPathRaw = core.getInput('speckle_function_path');
const speckleFunctionIdRaw = core.getInput('speckle_function_id');
const speckleFunctionInputSchema = core.getInput('speckle_function_input_schema');
const speckleFunctionCommand = core.getInput('speckle_function_command');
@@ -22184,7 +22180,6 @@ async function run() {
const { versionId } = await registerSpeckleFunction({
speckleServerUrl: speckleAutomateUrlRaw,
speckleToken: speckleTokenRaw,
speckleFunctionPath: speckleFunctionPathRaw,
speckleFunctionId: speckleFunctionIdRaw,
speckleFunctionInputSchema,
speckleFunctionCommand,
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
-2
View File
@@ -7,7 +7,6 @@ async function run(): Promise<void> {
const speckleAutomateUrlRaw = core.getInput('speckle_automate_url')
const speckleTokenRaw = core.getInput('speckle_token')
core.setSecret(speckleTokenRaw)
const speckleFunctionPathRaw = core.getInput('speckle_function_path')
const speckleFunctionIdRaw = core.getInput('speckle_function_id')
const speckleFunctionInputSchema = core.getInput('speckle_function_input_schema')
const speckleFunctionCommand = core.getInput('speckle_function_command')
@@ -24,7 +23,6 @@ async function run(): Promise<void> {
const { versionId } = await registerSpeckleFunction({
speckleServerUrl: speckleAutomateUrlRaw,
speckleToken: speckleTokenRaw,
speckleFunctionPath: speckleFunctionPathRaw,
speckleFunctionId: speckleFunctionIdRaw,
speckleFunctionInputSchema,
speckleFunctionCommand,
-5
View File
@@ -3,7 +3,6 @@ import { Logger } from './logging/logger.js'
import {
SpeckleServerUrlSchema,
SpeckleTokenSchema,
SpeckleFunctionPathSchema,
SpeckleFunctionIdSchema,
SpeckleFunctionInputSchema,
VersionTagSchema,
@@ -20,7 +19,6 @@ type ProcessOptions = {
speckleToken: string
versionTag: string
commitId: string
speckleFunctionPath: string | undefined
speckleFunctionId: string
speckleFunctionCommand: string
speckleFunctionInputSchema?: string | undefined
@@ -37,7 +35,6 @@ export async function registerSpeckleFunction(
): Promise<ProcessResult> {
let speckleServerUrl: string
let speckleToken: string
let speckleFunctionPath: string
let speckleFunctionId: string
let speckleFunctionCommand: string[]
let speckleFunctionInputSchema: Record<string, unknown>
@@ -46,7 +43,6 @@ export async function registerSpeckleFunction(
try {
speckleServerUrl = SpeckleServerUrlSchema.parse(opts.speckleServerUrl)
speckleToken = SpeckleTokenSchema.parse(opts.speckleToken)
speckleFunctionPath = SpeckleFunctionPathSchema.parse(opts.speckleFunctionPath)
speckleFunctionId = SpeckleFunctionIdSchema.parse(opts.speckleFunctionId)
versionTag = VersionTagSchema.parse(opts.versionTag)
commitId = CommitIdSchema.parse(opts.commitId)
@@ -60,7 +56,6 @@ export async function registerSpeckleFunction(
opts.logger.info(`Speckle Server URL: '${speckleServerUrl}'`)
//token is masked in the logs, so no need to print it here.
opts.logger.info(`Speckle Function Path: '${speckleFunctionPath}'`)
opts.logger.info(`Speckle Function ID: '${speckleFunctionId}'`)
// const manifest = await findAndParseManifest(speckleFunctionPath, {
-2
View File
@@ -50,7 +50,6 @@ describe('integration', () => {
speckleFunctionId: 'functionid',
speckleServerUrl: 'https://integration1.automate.speckle.example.org',
speckleToken: 'supersecret',
speckleFunctionPath: 'examples/minimal',
speckleFunctionCommand: 'echo Hello world',
versionTag: 'main',
commitId: '1234567890',
@@ -71,7 +70,6 @@ describe('integration', () => {
speckleFunctionId: 'functionid',
speckleServerUrl: 'https://integration1.automate.speckle.example.org',
speckleToken: '',
speckleFunctionPath: undefined,
speckleFunctionCommand: 'echo Hello world',
versionTag: '',
commitId: '',