From 284aba3bd97f504ee88d3347f3aaeb1659723d9c Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Sat, 7 Oct 2023 13:29:42 +0000 Subject: [PATCH] fix dependents --- .github/workflows/deploy-pages.yml | 8 ++++++-- src/ExpandAzurePipelines/App.razor | 4 ++-- src/Runner.Server/Controllers/MessageController.cs | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 94458542387..47cc7de9b35 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -2,11 +2,12 @@ on: push: branches: - main + pull_request: jobs: deploy: # Allow one concurrent deployment concurrency: - group: "pages" + group: ${{ github.event_name == 'push' && 'pages' || github.run_id }} cancel-in-progress: true # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: @@ -14,7 +15,7 @@ jobs: pages: write id-token: write environment: - name: github-pages + name: ${{ github.event_name == 'push' && 'github-pages' || '' }} url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest env: @@ -32,11 +33,14 @@ jobs: mkdir webapp mv out/wwwroot webapp/ExpandAzurePipelines - name: Setup Pages + if: github.event_name == 'push' uses: actions/configure-pages@v3 - name: Upload artifact + if: github.event_name == 'push' uses: actions/upload-pages-artifact@v1 with: path: 'webapp' - name: Deploy to GitHub Pages + if: github.event_name == 'push' id: deployment uses: actions/deploy-pages@v1 \ No newline at end of file diff --git a/src/ExpandAzurePipelines/App.razor b/src/ExpandAzurePipelines/App.razor index 587755c4112..528d0d10fd3 100644 --- a/src/ExpandAzurePipelines/App.razor +++ b/src/ExpandAzurePipelines/App.razor @@ -127,8 +127,8 @@ TraceWriter = new GitHub.DistributedTask.ObjectTemplating.EmptyTraceWriter(), Flags = GitHub.DistributedTask.Expressions2.ExpressionFlags.DTExpressionsV1 | GitHub.DistributedTask.Expressions2.ExpressionFlags.ExtendedDirectives }; - var template = AzureDevops.ReadTemplate(context, currentFileName); - var pipeline = new Runner.Server.Azure.Devops.Pipeline().Parse(context.ChildContext(template, currentFileName), template); + var template = await AzureDevops.ReadTemplate(context, currentFileName); + var pipeline = await new Runner.Server.Azure.Devops.Pipeline().Parse(context.ChildContext(template, currentFileName), template); var newcontent = pipeline.ToContextData().ToJToken().ToString(); var deserializer = new YamlDotNet.Serialization.DeserializerBuilder().Build(); var serializer = new YamlDotNet.Serialization.SerializerBuilder().WithEventEmitter(emitter => { diff --git a/src/Runner.Server/Controllers/MessageController.cs b/src/Runner.Server/Controllers/MessageController.cs index 879b7da7e36..83349ba8659 100644 --- a/src/Runner.Server/Controllers/MessageController.cs +++ b/src/Runner.Server/Controllers/MessageController.cs @@ -3186,7 +3186,7 @@ private HookResponse AzureDevopsMain(string fileRelativePath, string content, st workflowParameters[kv.Key.ToString()] = kv.Value; } } - var evaluatedRoot = AzureDevops.ReadTemplate(context, fileRelativePath, workflowParameters); + var evaluatedRoot = AzureDevops.ReadTemplate(context, fileRelativePath, workflowParameters).GetAwaiter().GetResult(); bool forceTaskCacheUpdate = workflowContext.HasFeature("system.runner.server.forceTaskCacheUpdate"); bool skipTaskCacheUpdate = workflowContext.HasFeature("system.runner.server.skipTaskCacheUpdate"); bool taskCacheUpdate = workflowContext.HasFeature("system.runner.server.taskCacheUpdate"); @@ -3305,7 +3305,7 @@ private HookResponse AzureDevopsMain(string fileRelativePath, string content, st return null; } }; - var pipeline = new Azure.Devops.Pipeline().Parse(context.ChildContext(evaluatedRoot, fileRelativePath), evaluatedRoot); + var pipeline = new Azure.Devops.Pipeline().Parse(context.ChildContext(evaluatedRoot, fileRelativePath), evaluatedRoot).GetAwaiter().GetResult(); var localJobCompletedEvents = new LocalJobCompletedEvents(); Action jobCompleted = e => {