|
3 | 3 | name: IPA Validation Metrics Release |
4 | 4 | on: |
5 | 5 | schedule: |
6 | | - - cron: '0 22 * * *' # Runs daily at 22:00 UTC (10 PM UTC) |
| 6 | + - cron: '0 11 * * *' # Runs daily at 11:00 UTC (11 AM UTC) |
7 | 7 | workflow_dispatch: |
8 | 8 | permissions: |
9 | 9 | issues: write |
10 | 10 | env: |
11 | 11 | NODE_VERSION: '20.x' |
12 | 12 | WORKING_DIR: ./tools/spectral/ipa/metrics/scripts |
13 | 13 | OAS_ENV: 'dev' |
14 | | - OAS_BRANCH: 'main' |
| 14 | + OAS_BRANCH: 'dev' |
| 15 | + OAS_FILE: 'openapi/v2.json' |
15 | 16 |
|
16 | 17 | jobs: |
17 | 18 | # Generates and uploads the IPA validation metrics to S3 |
18 | 19 | release-IPA-metrics: |
19 | 20 | name: Release IPA Validation Metrics |
20 | 21 | runs-on: ubuntu-latest |
21 | 22 | steps: |
22 | | - - name: Checkout |
23 | | - uses: actions/checkout@v4 |
| 23 | + - name: Checkout repository (scripts) |
| 24 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 |
| 25 | + with: |
| 26 | + sparse-checkout: |
| 27 | + tools/spectral/ipa |
| 28 | + |
| 29 | + - name: Checkout repository (dev branch) |
| 30 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 |
| 31 | + with: |
| 32 | + ref: $OAS_BRANCH |
| 33 | + sparse-checkout: $OAS_FILE |
24 | 34 |
|
25 | 35 | - name: Setup Node |
26 | 36 | uses: actions/setup-node@v4 |
|
31 | 41 | - name: Install npm dependencies |
32 | 42 | run: npm install |
33 | 43 |
|
34 | | - - name: Checkout repository |
35 | | - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 |
36 | | - with: |
37 | | - ref: $OAS_BRANCH |
38 | | - token: ${{secrets.API_BOT_PAT}} |
39 | | - |
40 | | - - name: Upload current Specs and Changelog files |
41 | | - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 |
42 | | - with: |
43 | | - name: base-$OAS_ENV |
44 | | - retention-days: 1 |
45 | | - path: | |
46 | | - openapi/v2/openapi*.json |
47 | | - changelog/changelog.json |
48 | | - changelog/internal/changelog-all.json |
49 | | - changelog/internal/metadata.json |
50 | | -
|
51 | | - - name: Download openapi-foas |
52 | | - uses: actions/download-artifact@v4 |
53 | | - with: |
54 | | - name: openapi-foas-$OAS_ENV |
55 | | - github-token: ${{ secrets.API_BOT_PAT }} |
56 | | - |
57 | 44 | - name: Run Metric Collection Job |
58 | 45 | working-directory: $WORKING_DIR |
59 | | - run: node runMetricCollection.js ../../../../../openapi-foas.json |
| 46 | + run: node runMetricCollection.js ../../../../../openapi/v2.json |
60 | 47 |
|
61 | 48 | - name: Dump Metric Collection Job Data to S3 |
62 | 49 | env: |
|
0 commit comments