From 682bb80669df63ecf830f4c6df36a07221792500 Mon Sep 17 00:00:00 2001 From: James Dawson Date: Mon, 18 Nov 2024 09:15:41 +0000 Subject: [PATCH 1/5] Switch 'vellum-site-build' to use scripted build composite action --- actions/vellum-site-build/action.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/actions/vellum-site-build/action.yml b/actions/vellum-site-build/action.yml index 546f31c..10d8d63 100644 --- a/actions/vellum-site-build/action.yml +++ b/actions/vellum-site-build/action.yml @@ -24,17 +24,15 @@ runs: restore-keys: | ${{ runner.os }}-npm- - - name: Build + - uses: endjin/Endjin.RecommendedPractices.GitHubActions/actions/run-scripted-build@main id: build - run: | - if ($env:GITHUB_REF -eq "refs/heads/main") { - $env:BUILDVAR_RebuildSearchIndex = "True" - } - & ${{ inputs.buildScriptPath }} -Verbose - shell: pwsh + with: + additionalNetSdkVersion: '9.x' + tasks: '.' env: GH_TOKEN : ${{ inputs.githubVellumPat }} NPM_CACHE_HIT: ${{ steps.cache_npm_dependencies.outputs.cache-hit }} + BUILDVAR_RebuildSearchIndex: ${{ github.ref == 'refs/heads/main' && 'True' || 'False' }} - run: | zip -r website.zip ${{ github.workspace }}/.dist From 797a2120458aedb2762cb4249c5abee42d44661a Mon Sep 17 00:00:00 2001 From: James Dawson Date: Mon, 18 Nov 2024 10:01:53 +0000 Subject: [PATCH 2/5] Point 'vellum-site-build-deploy' action to pre-release version of 'vellum-site-build' --- actions/vellum-site-build-deploy/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/vellum-site-build-deploy/action.yml b/actions/vellum-site-build-deploy/action.yml index 09a7bef..552cab6 100644 --- a/actions/vellum-site-build-deploy/action.yml +++ b/actions/vellum-site-build-deploy/action.yml @@ -41,7 +41,7 @@ inputs: runs: using: "composite" steps: - - uses: endjin/Endjin.RecommendedPractices.GitHubActions/actions/vellum-site-build@main + - uses: endjin/Endjin.RecommendedPractices.GitHubActions/actions/vellum-site-build@feature/update-vellum-composite-action id: build with: githubVellumPat: ${{ inputs.github_reader_pat }} From 8bea0763a99cc6ff31140cf1c7d6337ac791746c Mon Sep 17 00:00:00 2001 From: James Dawson Date: Mon, 18 Nov 2024 10:26:18 +0000 Subject: [PATCH 3/5] update 'run-scripted-build' composite action to allow use of custom GitHub token --- actions/run-scripted-build/action.yml | 2 +- actions/vellum-site-build/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/run-scripted-build/action.yml b/actions/run-scripted-build/action.yml index 6bde932..38d3d00 100644 --- a/actions/run-scripted-build/action.yml +++ b/actions/run-scripted-build/action.yml @@ -118,7 +118,7 @@ runs: -Configuration ${{ inputs.configuration }} shell: pwsh env: - GH_TOKEN: ${{ github.token }} + GH_TOKEN: ${{ env.GH_TOKEN != '' ? env.GH_TOKEN | github.token }} NUGET_PACKAGES: ${{ github.workspace }}/.nuget-packages - name: Save Cached Outputs diff --git a/actions/vellum-site-build/action.yml b/actions/vellum-site-build/action.yml index 10d8d63..056c933 100644 --- a/actions/vellum-site-build/action.yml +++ b/actions/vellum-site-build/action.yml @@ -24,7 +24,7 @@ runs: restore-keys: | ${{ runner.os }}-npm- - - uses: endjin/Endjin.RecommendedPractices.GitHubActions/actions/run-scripted-build@main + - uses: endjin/Endjin.RecommendedPractices.GitHubActions/actions/run-scripted-build@feature/update-vellum-composite-action id: build with: additionalNetSdkVersion: '9.x' From 47a94f16e975129dec4c7d9dc4da3d866a7fb17a Mon Sep 17 00:00:00 2001 From: James Dawson Date: Mon, 18 Nov 2024 10:29:11 +0000 Subject: [PATCH 4/5] Fix ternary syntax --- actions/run-scripted-build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/run-scripted-build/action.yml b/actions/run-scripted-build/action.yml index 38d3d00..865db42 100644 --- a/actions/run-scripted-build/action.yml +++ b/actions/run-scripted-build/action.yml @@ -118,7 +118,7 @@ runs: -Configuration ${{ inputs.configuration }} shell: pwsh env: - GH_TOKEN: ${{ env.GH_TOKEN != '' ? env.GH_TOKEN | github.token }} + GH_TOKEN: ${{ env.GH_TOKEN != '' && env.GH_TOKEN || github.token }} NUGET_PACKAGES: ${{ github.workspace }}/.nuget-packages - name: Save Cached Outputs From 6bf0b893d2782a1bc95e3d849baaaa6dcc3022ad Mon Sep 17 00:00:00 2001 From: James Dawson Date: Mon, 18 Nov 2024 10:48:19 +0000 Subject: [PATCH 5/5] Switch branch references to 'main' ahead of PR merge --- actions/vellum-site-build-deploy/action.yml | 2 +- actions/vellum-site-build/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/vellum-site-build-deploy/action.yml b/actions/vellum-site-build-deploy/action.yml index 552cab6..09a7bef 100644 --- a/actions/vellum-site-build-deploy/action.yml +++ b/actions/vellum-site-build-deploy/action.yml @@ -41,7 +41,7 @@ inputs: runs: using: "composite" steps: - - uses: endjin/Endjin.RecommendedPractices.GitHubActions/actions/vellum-site-build@feature/update-vellum-composite-action + - uses: endjin/Endjin.RecommendedPractices.GitHubActions/actions/vellum-site-build@main id: build with: githubVellumPat: ${{ inputs.github_reader_pat }} diff --git a/actions/vellum-site-build/action.yml b/actions/vellum-site-build/action.yml index 056c933..10d8d63 100644 --- a/actions/vellum-site-build/action.yml +++ b/actions/vellum-site-build/action.yml @@ -24,7 +24,7 @@ runs: restore-keys: | ${{ runner.os }}-npm- - - uses: endjin/Endjin.RecommendedPractices.GitHubActions/actions/run-scripted-build@feature/update-vellum-composite-action + - uses: endjin/Endjin.RecommendedPractices.GitHubActions/actions/run-scripted-build@main id: build with: additionalNetSdkVersion: '9.x'