From c3b2c6e0cfaf1ac33afc836d140447e677679c16 Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Tue, 19 Mar 2024 13:52:10 +0100 Subject: [PATCH] revert to using GITHUB_ENV --- .github/workflows/pipeline.yml | 15 +++++++++++---- StagingArea/test/test@2.0.1.fsx | 2 +- scripts/pre-publish-checks.fsx | 4 ++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 2e55e8d..38aa462 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -217,8 +217,8 @@ jobs: needs: test-staging-area runs-on: ubuntu-latest outputs: - trigger-update-preview-index: ${{ steps.ppc.outputs.trigger-release-staging-area }} - trigger-publish-pending-packages: ${{ steps.ppc.outputs.trigger-publish-pending-packages }} + trigger-update-preview-index: ${{ steps.set-output.outputs.trigger-update-preview-index }} + trigger-publish-pending-packages: ${{ steps.set-output.outputs.trigger-publish-pending-packages }} steps: - uses: actions/checkout@v4 - name: Set up .NET @@ -229,11 +229,18 @@ jobs: id: ppc run: | dotnet fsi scripts/pre-publish-checks.fsx + - name: set-output + id: set-output + run: | + echo "trigger-update-preview-index=$UPDATE_PREVIEW_INDEX" + echo "trigger-update-preview-index=$UPDATE_PREVIEW_INDEX" >> $GITHUB_OUTPUT + echo "trigger-publish-pending-packages=$PUBLISH_PENDING_PACKAGES" + echo "trigger-publish-pending-packages=$PUBLISH_PENDING_PACKAGES" >> $GITHUB_OUTPUT - name: list triggered jobs run: | echo "this should trigger the following jobs:" - echo "trigger-update-preview-index: ${{steps.ppc.outputs.trigger-update-preview-index}}" - echo "trigger-publish-pending-packages: ${{steps.ppc.outputs.trigger-publish-pending-packages}}" + echo "trigger-update-preview-index: ${{steps.set-output.outputs.trigger-update-preview-index}}" + echo "trigger-publish-pending-packages: ${{steps.set-output.outputs.trigger-publish-pending-packages}}" update-preview-index: needs: staging-area-pre-publish-checks diff --git a/StagingArea/test/test@2.0.1.fsx b/StagingArea/test/test@2.0.1.fsx index 619313a..1a38d74 100644 --- a/StagingArea/test/test@2.0.1.fsx +++ b/StagingArea/test/test@2.0.1.fsx @@ -20,7 +20,7 @@ Tags: - Name: validation - Name: my-package - Name: thing -ReleaseNotes: "Trigger another CI run!" +ReleaseNotes: "Trigger another CI run" --- *) diff --git a/scripts/pre-publish-checks.fsx b/scripts/pre-publish-checks.fsx index 797b39d..b9d59d8 100644 --- a/scripts/pre-publish-checks.fsx +++ b/scripts/pre-publish-checks.fsx @@ -42,11 +42,11 @@ open System open System.IO // https://stackoverflow.com/questions/70123328/how-to-set-environment-variables-in-github-actions-using-python -let GITHUB_ENV = Environment.GetEnvironmentVariable("GITHUB_OUTPUT") +let GITHUB_ENV = Environment.GetEnvironmentVariable("GITHUB_ENV") if staging_diff.Length > 0 then File.AppendAllLines(GITHUB_ENV, ["UPDATE_PREVIEW_INDEX=true"]) else File.AppendAllLines(GITHUB_ENV, ["UPDATE_PREVIEW_INDEX=false"]) -printfn $"""GITHUB_OUTPUT={File.ReadAllText(GITHUB_ENV)}""" \ No newline at end of file +printfn $"""GITHUB_ENV={File.ReadAllText(GITHUB_ENV)}""" \ No newline at end of file