From 1bb94631c1e891f9d3fd9595c2bdf9458ed088b4 Mon Sep 17 00:00:00 2001 From: MateuszMazurek Date: Sat, 2 Mar 2024 15:45:45 +0100 Subject: [PATCH] Testing the MONGO_CONNECT secret --- .github/workflows/main.yml | 1 + SpeckleAutomateDotnetExample/AutomateFunction.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 77ddc20..3d8260b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,6 +10,7 @@ jobs: env: FUNCTION_SCHEMA_FILE_NAME: functionSchema.json SPECKLE_AUTOMATE_URL: https://automate.speckle.dev + MONGO_CONNECT: ${{ secrets.MONGO_CONNECT }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.1 diff --git a/SpeckleAutomateDotnetExample/AutomateFunction.cs b/SpeckleAutomateDotnetExample/AutomateFunction.cs index 58e0c01..efcb95d 100644 --- a/SpeckleAutomateDotnetExample/AutomateFunction.cs +++ b/SpeckleAutomateDotnetExample/AutomateFunction.cs @@ -23,6 +23,9 @@ FunctionInputs functionInputs .Flatten() .Count(b => b.speckle_type == functionInputs.SpeckleTypeToCount); + var mongoConnect = Environment.GetEnvironmentVariable("MONGO_CONNECT"); + Console.WriteLine($"MONGO_CONNECT: {mongoConnect}"); + Console.WriteLine($"Counted {count} objects"); automationContext.MarkRunSuccess($"Counted {count} objects"); }