@@ -25,39 +25,16 @@ inputs:
2525 description : " Name of the Component to deploy"
2626 required : true
2727 default : ' api'
28- nodejs_version :
29- description : " Node.js version, set by the CI/CD pipeline workflow"
30- required : true
31- NODE_AUTH_TOKEN :
32- description : " Token for access to github package registry"
33- required : true
3428
3529runs :
3630 using : composite
3731
3832 steps :
39- - name : Checkout
40- uses : actions/checkout@v4
41- - uses : actions/setup-node@v4
42- with :
43- node-version : ${{ inputs.nodejs_version }}
44- registry-url : ' https://npm.pkg.github.com'
45-
46- - name : " Cache node_modules"
47- uses : actions/cache@v4
33+ - name : Download OAS Spec artifact
34+ uses : actions/download-artifact@v4
4835 with :
49- path : |
50- **/node_modules
51- key : ${{ runner.os }}-node-${{ inputs.nodejs_version }}-${{ hashFiles('**/package-lock.json') }}
52- restore-keys : |
53- ${{ runner.os }}-node-${{ inputs.nodejs_version }}-
54-
55- - name : Npm install
56- working-directory : .
57- env :
58- NODE_AUTH_TOKEN : ${{ inputs.NODE_AUTH_TOKEN }}
59- run : npm ci
60- shell : bash
36+ name : api-oas-specification-${{ inputs.apimEnv }}${{ inputs.version != '' && format('-{0}', inputs.version) || '' }}
37+ path : ./build
6138
6239 - name : Setup Proxy Name and target
6340 shell : bash
@@ -87,21 +64,10 @@ runs:
8764 echo "MTLS_NAME=notify-supplier-mtls-pr$PR_NUMBER" >> $GITHUB_ENV
8865 fi
8966
90- - name : Build ${{ inputs.apimEnv }} oas
91- working-directory : .
92- env :
93- APIM_ENV : ${{ inputs.apimEnv }}
67+ - name : Set APIM_ENV
9468 shell : bash
9569 run : |
96- if [ ${{ env.APIM_ENV }} == "internal-dev-sandbox" ] && [ ${{ inputs.buildSandbox }} == true ]
97- then
98- echo "Building sandbox OAS spec"
99- make build-json-oas-spec APIM_ENV=sandbox
100- else
101- echo "Building env specific OAS spec"
102- make build-json-oas-spec APIM_ENV=${{ env.APIM_ENV }}
103- fi
104-
70+ APIM_ENV="${{ inputs.apimEnv }}"
10571 if [[ $APIM_ENV == *-pr ]]; then
10672 echo "Removing pr suffix from APIM_ENV after building OAS and calling proxygen"
10773 APIM_ENV=$(echo "$APIM_ENV" | sed 's/-pr$//')
0 commit comments