Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jojost46 authored Nov 14, 2024
0 parents commit 92dea23
Show file tree
Hide file tree
Showing 25 changed files with 1,666 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .csharpierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 88,
"useTabs": false,
"tabWidth": 2,
"preprocessorSymbolSets": ["", "DEBUG", "DEBUG,CODE_STYLE"]
}
42 changes: 42 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"name": "C# (.NET)",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:0-7.0",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "dotnet restore",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/dotnet:2": {}
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"csharpier.csharpier-vscode",
"ms-dotnettools.csharp",
"ms-dotnettools.csdevkit",
"ms-azuretools.vscode-docker"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/bin/
**/obj/
.git
.env
.envrc
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "build and deploy Speckle functions"
on:
workflow_dispatch:
push:
tags:
- '*'

jobs:
publish-automate-function-version: # make sure the action works on a clean machine without building
env:
FUNCTION_SCHEMA_FILE_NAME: functionSchema.json
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup .NET Core SDK
uses: actions/[email protected]
with:
dotnet-version: 7.x
- name: Restore dependencies
run: dotnet restore
- name: Extract functionInputSchema
id: extract_schema
working-directory: "SpeckleAutomateDotnetExample"
run: |
dotnet build
dotnet run generate-schema ${HOME}/functionSchema.json
cat ${HOME}/functionSchema.json
- name: Speckle Automate Function - Build and Publish
uses: specklesystems/[email protected]
with:
speckle_function_command: "dotnet SpeckleAutomateDotnetExample.dll"
speckle_automate_url: ${{ env.SPECKLE_AUTOMATE_URL || vars.SPECKLE_AUTOMATE_URL || 'https://automate.speckle.dev' }}
speckle_token: ${{ secrets.SPECKLE_FUNCTION_TOKEN }}
speckle_function_id: ${{ secrets.SPECKLE_FUNCTION_ID }}
speckle_function_input_schema_file_path: ${{ env.FUNCTION_SCHEMA_FILE_NAME }}
Loading

0 comments on commit 92dea23

Please sign in to comment.