File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -111,12 +111,31 @@ jobs:
111111 echo ""
112112 echo "Has relevant changes: $HAS_RELEVANT_CHANGES"
113113
114+ - name : Prepare sparse checkout
115+ id : sparse-config
116+ run : |
117+ CONFIG="/*"$'\n'"!/modules/tool/packages"$'\n'"package.json"$'\n'"bun.lockb"
118+
119+ if [ -n "${{ steps.pr-files.outputs.package_changes }}" ]; then
120+ for package in ${{ steps.pr-files.outputs.package_changes }}; do
121+ CONFIG="$CONFIG"$'\n'"/modules/tool/packages/$package"
122+ done
123+ fi
124+
125+ echo "config<<EOF" >> $GITHUB_OUTPUT
126+ echo "$CONFIG" >> $GITHUB_OUTPUT
127+ echo "EOF" >> $GITHUB_OUTPUT
128+
129+ echo "Final sparse checkout config:"
130+ echo "$CONFIG"
131+
114132 - name : Checkout code with sparse checkout
115133 uses : actions/checkout@v4
116134 with :
117135 ref : ${{ github.event.pull_request.head.sha }}
118136 sparse-checkout-cone-mode : false
119- sparse-checkout : ${{ steps.pr-files.outputs.sparse_config }}
137+ sparse-checkout : |
138+ ${{ steps.sparse-config.outputs.config }}
120139
121140 - name : Verify sparse checkout
122141 run : |
You can’t perform that action at this time.
0 commit comments