66 - opened
77 - reopened
88 - synchronize
9+ - labeled
10+ - unlabeled
911 push :
10- tags :
11- - dev-v [0-9]+.[0-9]+.[0-9]+
12+ branches :
13+ - " [0-9]+.[0-9]+"
1214
1315# Only one instance of this workflow will run on the same ref (PR/Branch/Tag)
1416# Previous runs will be cancelled.
@@ -18,11 +20,14 @@ concurrency:
1820
1921jobs :
2022 define-versions :
23+ if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
2124 runs-on : ubuntu-latest
2225 outputs :
2326 fdiVersions : ${{ steps.versions.outputs.fdiVersions }}
2427 cdiVersions : ${{ steps.versions.outputs.cdiVersions }}
2528 nodeVersions : ' ["20"]'
29+ nodeFdiVersionMap : ${{ steps.node-versions.outputs.fdiVersions }}
30+ authReactFdiVersionMap : ${{ steps.auth-react-versions.outputs.fdiVersions }}
2631 steps :
2732 - uses : actions/checkout@v4
2833 - uses : supertokens/get-supported-versions-action@main
3136 has-fdi : true
3237 has-cdi : true
3338
39+ - uses : supertokens/actions/get-versions-from-repo@main
40+ id : auth-react-versions
41+ with :
42+ repo : supertokens-auth-react
43+ github-token : ${{ secrets.GITHUB_TOKEN }}
44+ fdi-versions : ${{ steps.versions.outputs.fdiVersions }}
45+
46+ - uses : supertokens/actions/get-versions-from-repo@main
47+ id : node-versions
48+ with :
49+ repo : supertokens-node
50+ github-token : ${{ secrets.GITHUB_TOKEN }}
51+ fdi-versions : ${{ steps.versions.outputs.fdiVersions }}
52+
3453 setup-auth-react :
54+ if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
3555 runs-on : ubuntu-latest
3656 needs : define-versions
3757 strategy :
@@ -50,19 +70,20 @@ jobs:
5070 matrix : ${{ steps.setup-matrix.outputs.matrix }}
5171
5272 steps :
53- - uses : supertokens/get- versions-action@main
73+ - name : Get node and auth-react versions for FDI
5474 id : versions
55- with :
56- driver-name : node
57- fdi-version : ${{ matrix.fdi-version }}
58- env :
59- SUPERTOKENS_API_KEY : ${{ secrets.SUPERTOKENS_API_KEY }}
75+ run : |
76+ nodeVersion=$( echo '${{ needs.define-versions.outputs.nodeFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
77+ authReactVersion=$( echo '${{ needs.define-versions.outputs.authReactFdiVersionMap }}' | jq -r '.["${{ matrix.fdi-version }}"]' )
78+
79+ echo "nodeVersion=${nodeVersion}" >> $GITHUB_OUTPUT
80+ echo "authReactVersion=${authReactVersion}" >> $GITHUB_OUTPUT
6081
6182 - uses : supertokens/auth-react-testing-action/setup@main
6283 id : envs
6384 with :
64- auth-react-version : ${{ steps.versions.outputs.authReactVersionXy }}
65- node-sdk-version : ${{ steps.versions.outputs.nodeTag }}
85+ auth-react-version : ${{ steps.versions.outputs.authReactVersion }}
86+ node-sdk-version : ${{ steps.versions.outputs.nodeVersion }}
6687 fdi-version : ${{ matrix.fdi-version }}
6788
6889 - id : setup-matrix
7495 spec: ${{ steps.envs.outputs.specs }}
7596
7697 launch-fdi-workflows :
98+ if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-tests')
7799 uses : ./.github/workflows/auth-react-test-2.yml
78100 needs :
79101 - define-versions
0 commit comments