Skip to content

Commit

Permalink
improve changed packages action (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
4leite authored Jun 5, 2024
1 parent 8abd9e9 commit 08ee401
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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'

0 comments on commit 08ee401

Please sign in to comment.