Skip to content

Commit

Permalink
skip build and push for private packages
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Ruck <[email protected]>
  • Loading branch information
Manuel Ruck committed Oct 8, 2023
1 parent 8e5f648 commit d3932d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ jobs:
turboChanges=$(turbo run build --dry-run=json --since=${{ env.SINCE }})
changedPackages=$(node -e "const results = $turboChanges.tasks.map((task) => ({ package: task.package, directory: task.directory })); process.stdout.write(JSON.stringify(results));")
echo "$changedPackages"
changedPackages=$(node -e "const fs = require('fs'); const results = $changedPackages.filter(({directory}) => {const private = JSON.parse(fs.readFileSync(\`./\${directory}/package.json\`, 'utf8')).private; return \!private}); process.stdout.write(JSON.stringify(results));")
echo "$changedPackages"
echo "changedPackages=$changedPackages" >> $GITHUB_OUTPUT
changed=$(node -e "const results = $changedPackages.map(({package}) => package); process.stdout.write(JSON.stringify(results));")
echo "changed=$changed" >> $GITHUB_OUTPUT
- run: echo ${{ steps.changed-packages.outputs.changed }}
- name: Print Changed Packages
run: echo ${{ steps.changed-packages.outputs.changed }}

push:
runs-on: ubuntu-latest
Expand Down

0 comments on commit d3932d6

Please sign in to comment.