From c5da4a4db9f62af3606f1415463b263cf1ceb434 Mon Sep 17 00:00:00 2001 From: MohamedSabthar Date: Fri, 22 Sep 2023 10:47:27 +0530 Subject: [PATCH] Update pull request template workflow to dynamically set env variables --- .github/workflows/pull-request-build-template.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/pull-request-build-template.yml b/.github/workflows/pull-request-build-template.yml index de0be88c..2bd66dd0 100644 --- a/.github/workflows/pull-request-build-template.yml +++ b/.github/workflows/pull-request-build-template.yml @@ -40,6 +40,10 @@ jobs: distribution: 'temurin' java-version: 17.0.7 + - name: Set ENV Variables + run: | + echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV + - name: Build the Package env: packageUser: ${{ github.actor }} @@ -67,6 +71,11 @@ jobs: distribution: 'temurin' java-version: 17.0.7 + - name: Set ENV Variables + run: | + echo '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + \"=\" + .value' \ + | Out-File -FilePath $env:GITHUB_ENV -Append + - name: Build the Project env: packageUser: ${{ github.actor }}