Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve changed packages action #148

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/call-changed-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
# 3. We specify the .github/ folder as a dependency here. Just to be safe, if workflows changed, we use that to mean everything has changes pending... to force redeploys
run: |
echo 'result<<CHANGESET_DELIMITER' >> $GITHUB_OUTPUT
echo "$(npx -y turbo build --dry-run=json --filter=...[$TURBO_REF_FILTER] --global-deps=.github/*)" >> $GITHUB_OUTPUT
echo "$(sh ./scripts/changed.sh $TURBO_REF_FILTER)" >> $GITHUB_OUTPUT
echo 'CHANGESET_DELIMITER' >> $GITHUB_OUTPUT
- name: skip
Expand All @@ -65,7 +65,7 @@ jobs:
id: output-changed-packages
run: |
echo 'changed_packages<<CHANGED_PACKAGES_DELIMITER' >> $GITHUB_OUTPUT
echo "${{ github.head_ref == 'changeset-release/main' && '[]' || toJSON(fromJSON(steps.changeset.outputs.result).packages) }}" >> $GITHUB_OUTPUT
echo "${{ github.head_ref == 'changeset-release/main' && '[]' || steps.changeset.outputs.result }}" >> $GITHUB_OUTPUT
echo 'CHANGED_PACKAGES_DELIMITER' >> $GITHUB_OUTPUT
# Boolean check for specific package sets
Expand Down
1 change: 1 addition & 0 deletions scripts/changed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx -y turbo build --dry-run=json --filter=...[$1] --global-deps=.github/* | node -p 'JSON.parse(fs.readFileSync(0)).packages'
Loading