Skip to content

Commit

Permalink
ci: 👷 improve action variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Ruck committed Oct 8, 2023
1 parent 8ff64e4 commit 416a41c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:

env:
DEFAULT_BRANCH: origin/master
DEFAULT_BRANCH_REF: refs/heads/master

jobs:
analyse-changed-packages:
Expand Down Expand Up @@ -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));")
Expand Down

0 comments on commit 416a41c

Please sign in to comment.