|
1 | | -# This composite action is used to verify all loaders of a specific |
2 | | -# version exist in NR environments. |
| 1 | +# This composite action is used to report the local build size to New Relic |
| 2 | +# You must build the agent before running this action |
3 | 3 |
|
4 | | -name: 'NR Verify' |
| 4 | +name: 'Report Build Size to New Relic' |
5 | 5 |
|
6 | 6 | runs: |
7 | 7 | using: "composite" |
8 | 8 | steps: |
9 | 9 | - name: Install dependencies |
10 | 10 | run: npm install --silent --no-progress --prefix $GITHUB_ACTION_PATH/.. |
11 | 11 | shell: bash |
12 | | - - name: Run action script |
13 | | - id: action-script |
14 | | - run: | |
15 | | - node $GITHUB_ACTION_PATH/index.js \ |
16 | | - ${{ inputs.environment && format('--environment {0}', inputs.environment) || '' }} \ |
17 | | - --loader-version ${{ inputs.loader_version }} |
18 | | - shell: bash |
| 12 | + - name: Get local stats |
| 13 | + id: get-stats |
| 14 | + run: | |
| 15 | + rum=$(cat ./build/nr-rum-standard.stats.json); echo "rum=$rum" >> $GITHUB_OUTPUT; |
| 16 | + full=$(cat ./build/nr-full-standard.stats.json); echo "full=$full" >> $GITHUB_OUTPUT; |
| 17 | + spa=$(cat ./build/nr-spa-standard.stats.json); echo "spa=$spa" >> $GITHUB_OUTPUT; |
| 18 | + - name: Report rum size to NR |
| 19 | + uses: metal-messiah/webpack-build-size-action@main |
| 20 | + with: |
| 21 | + nr-api-key: ${{ secrets.INTERNAL_STAGING_INGEST_LICENSE_KEY }} |
| 22 | + nr-account-id: '550352' |
| 23 | + nr-env: 'staging' |
| 24 | + analysis-file-contents: ${{ steps.get-stats.outputs.rum }} |
| 25 | + file-name-filter: '.min.js' |
| 26 | + - name: Report full size to NR |
| 27 | + uses: metal-messiah/webpack-build-size-action@main |
| 28 | + with: |
| 29 | + nr-api-key: ${{ secrets.INTERNAL_STAGING_INGEST_LICENSE_KEY }} |
| 30 | + nr-account-id: '550352' |
| 31 | + nr-env: 'staging' |
| 32 | + analysis-file-contents: ${{ steps.get-stats.outputs.full }} |
| 33 | + file-name-filter: '.min.js' |
| 34 | + - name: Report spa size to NR |
| 35 | + uses: metal-messiah/webpack-build-size-action@main |
| 36 | + with: |
| 37 | + nr-api-key: ${{ secrets.INTERNAL_STAGING_INGEST_LICENSE_KEY }} |
| 38 | + nr-account-id: '550352' |
| 39 | + nr-env: 'staging' |
| 40 | + analysis-file-contents: ${{ steps.get-stats.outputs.spa }} |
| 41 | + file-name-filter: '.min.js' |
0 commit comments