From 416a41c6c73b0ed1e145ce798dce2cca51518721 Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Sun, 8 Oct 2023 20:24:11 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=91=B7=20improve=20action=20variabl?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-and-push.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index 69f71ed66..f7f26ae13 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -17,6 +17,7 @@ on: env: DEFAULT_BRANCH: origin/master + DEFAULT_BRANCH_REF: refs/heads/master jobs: analyse-changed-packages: @@ -45,7 +46,7 @@ jobs: id: changed-packages run: | turboChanges="" - if [ "${{ github.ref }}" = "refs/heads/master" ]; \ + if [ "${{ github.ref }}" = "${{ env.DEFAULT_BRANCH_REF }}" ]; \ then turboChanges=$(turbo run build --dry-run=json --since="${{ github.event.before }}"); \ else turboChanges=$(turbo run build --dry-run=json --since="${{ env.DEFAULT_BRANCH }}"); fi changedPackages=$(node -e "const results = $turboChanges.tasks.map((task) => ({ package: task.package, directory: task.directory })); process.stdout.write(JSON.stringify(results));")