@@ -2,25 +2,19 @@ name: IPA Validation Metrics Release
22on :
33 workflow_call :
44 secrets : # all secrets are passed explicitly in this workflow
5- # aws_access_key:
6- # required: true
7- # aws_secret_key:
8- # required: true
9- # aws_s3_bucket_prefix:
10- # required: true
11- api_bot_pat :
5+ aws_access_key :
6+ required : true
7+ aws_secret_key :
128 required : true
13- IPA_S3_BUCKET_DW_STAGING_USERNAME :
9+ aws_s3_bucket_prefix :
1410 required : true
15- IPA_S3_BUCKET_DW_STAGING_PASSWORD :
11+ api_bot_pat :
1612 required : true
17- IPA_S3_BUCKET_DW_STAGING_PREFIX :
13+ inputs :
14+ env :
15+ description : ' Environment for the FOAS to use for IPA metrics collection'
1816 required : true
19- # inputs:
20- # env:
21- # description: 'Environment for the FOAS to use for IPA metrics collection'
22- # required: true
23- # type: string
17+ type : string
2418 workflow_dispatch :
2519
2620permissions :
@@ -67,21 +61,21 @@ jobs:
6761 - name : Install npm dependencies
6862 run : npm install
6963
70- # - name: Download openapi-foas
71- # uses: actions/download-artifact@v4
72- # with:
73- # name: openapi-foas-dev # TODO: Change to passed input env
74- # github-token: ${{ secrets.api_bot_pat }}
75- # run-id: ${{ github.run_id }}
64+ - name : Download openapi-foas
65+ uses : actions/download-artifact@v4
66+ with :
67+ name : openapi-foas-${{ inputs. env }}
68+ github-token : ${{ secrets.api_bot_pat }}
69+ run-id : ${{ github.run_id }}
7670
7771 - name : Run Metric Collection Job
7872 working-directory : ./tools/spectral/ipa/metrics/scripts
79- run : node runMetricCollection.js ../../../../../openapi/v2 .json # TODO: Change to foas from above
73+ run : node runMetricCollection.js ../../../../../openapi-foas .json
8074
8175 - name : Dump Metric Collection Job Data to S3
8276 env :
83- AWS_ACCESS_KEY_ID : ${{ secrets.IPA_S3_BUCKET_DW_STAGING_USERNAME }} # TODO: Change to passed secret
84- AWS_SECRET_ACCESS_KEY : ${{ secrets.IPA_S3_BUCKET_DW_STAGING_PASSWORD }} # TODO: Change to passed secret
85- S3_BUCKET_PREFIX : ${{ secrets.IPA_S3_BUCKET_DW_STAGING_PREFIX }} # TODO: Change to passed secret
77+ AWS_ACCESS_KEY_ID : ${{ secrets.aws_access_key }}
78+ AWS_SECRET_ACCESS_KEY : ${{ secrets.aws_secret_key }}
79+ S3_BUCKET_PREFIX : ${{ secrets.aws_s3_bucket_prefix }}
8680 working-directory : ./tools/spectral/ipa/metrics/scripts
8781 run : node dataDump.js
0 commit comments