@@ -39,22 +39,51 @@ jobs:
3939 echo "β
No skip flag - proceeding with publish/release"
4040 fi
4141
42- # Detect which test API versions were modified in this push
42+ # Detect which test API versions were modified
43+ # On repository_dispatch: versions come from client payload (paths-filter can't
44+ # detect changes correctly because dispatch runs on master, not test-auto-generate)
45+ # On push: use paths-filter as normal (push events have correct git context)
46+ # NOTE: This is a SANDBOX-ONLY workaround. Production on-push-master.yml does NOT
47+ # need this because both push and dispatch target master (same branch = correct context).
4348 detect-changes :
4449 runs-on : ubuntu-latest
4550 outputs :
46- test_v20111101 : ${{ steps.filter .outputs.test_v20111101 }}
47- test_v20250224 : ${{ steps.filter .outputs.test_v20250224 }}
51+ test_v20111101 : ${{ steps.result .outputs.test_v20111101 }}
52+ test_v20250224 : ${{ steps.result .outputs.test_v20250224 }}
4853 steps :
4954 - uses : actions/checkout@v3
50- - uses : dorny/paths-filter@v2
55+ - name : Detect from dispatch payload
56+ id : dispatch
57+ if : github.event_name == 'repository_dispatch'
58+ run : |
59+ VERSIONS="${{ github.event.client_payload.versions }}"
60+ echo "π Dispatch payload versions: $VERSIONS"
61+ [[ "$VERSIONS" == *"v20111101"* ]] && echo "test_v20111101=true" >> $GITHUB_OUTPUT || echo "test_v20111101=false" >> $GITHUB_OUTPUT
62+ [[ "$VERSIONS" == *"v20250224"* ]] && echo "test_v20250224=true" >> $GITHUB_OUTPUT || echo "test_v20250224=false" >> $GITHUB_OUTPUT
63+ - name : Detect from push paths
5164 id : filter
65+ if : github.event_name == 'push'
66+ uses : dorny/paths-filter@v2
5267 with :
5368 filters : |
5469 test_v20111101:
5570 - 'test-v20111101/**'
5671 test_v20250224:
5772 - 'test-v20250224/**'
73+ - name : Set outputs
74+ id : result
75+ run : |
76+ if [ "${{ github.event_name }}" = "repository_dispatch" ]; then
77+ echo "test_v20111101=${{ steps.dispatch.outputs.test_v20111101 }}" >> $GITHUB_OUTPUT
78+ echo "test_v20250224=${{ steps.dispatch.outputs.test_v20250224 }}" >> $GITHUB_OUTPUT
79+ echo "π Using dispatch-based detection"
80+ else
81+ echo "test_v20111101=${{ steps.filter.outputs.test_v20111101 }}" >> $GITHUB_OUTPUT
82+ echo "test_v20250224=${{ steps.filter.outputs.test_v20250224 }}" >> $GITHUB_OUTPUT
83+ echo "π Using paths-filter-based detection"
84+ fi
85+ echo "π test_v20111101=${{ steps.dispatch.outputs.test_v20111101 || steps.filter.outputs.test_v20111101 }}"
86+ echo "π test_v20250224=${{ steps.dispatch.outputs.test_v20250224 || steps.filter.outputs.test_v20250224 }}"
5887
5988 # Simulated publish and release for each version conditionally
6089 # Same conditional structure as production but echoes success instead of real npm publish/GitHub release
0 commit comments