From 6946470081dd7307d1a385b7d094d5ef879d2364 Mon Sep 17 00:00:00 2001 From: Aaron J Todd Date: Wed, 21 Feb 2024 17:21:11 -0500 Subject: [PATCH] try again --- .github/workflows/artifact-size-check.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/artifact-size-check.yml b/.github/workflows/artifact-size-check.yml index d66de13e8ed..5816abb8c51 100644 --- a/.github/workflows/artifact-size-check.yml +++ b/.github/workflows/artifact-size-check.yml @@ -24,9 +24,15 @@ jobs: if: ${{ github.event_name == 'pull_request' }} runs-on: ubuntu-latest steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + path: 'aws-sdk-kotlin' - name: Setup Build uses: ./aws-sdk-kotlin/.github/actions/setup-build - name: Check artifact sizes + working-directory: ./aws-sdk-kotlin + shell: bash run: | ./gradlew :codegen:sdk:bootstrap -Paws.services=${{ env.BOOTSTRAP_SERVICES }} ./gradlew artifactMetrics @@ -36,6 +42,8 @@ jobs: role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} aws-region: us-west-2 - name: Compare metrics + working-directory: ./aws-sdk-kotlin + shell: bash run: | ./gradlew checkArtifactMetrics - name: Publish PR comment @@ -43,7 +51,7 @@ jobs: with: script: | const fs = require('node:fs'); - const content = fs.readFileSync('./build/reports/metrics/artifact-summary.md'); + const content = fs.readFileSync('./aws-sdk-kotlin/build/reports/metrics/artifact-summary.md'); await github.rest.issues.createComment({ issue_number: ${{ github.event.number }}, owner: context.repo.owner, @@ -55,9 +63,15 @@ jobs: if: ${{ github.event_name == 'release' }} runs-on: ubuntu-latest steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + path: 'aws-sdk-kotlin' - name: Setup Build uses: ./aws-sdk-kotlin/.github/actions/setup-build - name: Check artifact sizes + working-directory: ./aws-sdk-kotlin + shell: bash run: | ./gradlew :codegen:sdk:bootstrap -Paws.services=${{ env.BOOTSTRAP_SERVICES }} ./gradlew artifactMetrics @@ -67,5 +81,7 @@ jobs: role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} aws-region: us-west-2 - name: Publish new metrics + working-directory: ./aws-sdk-kotlin + shell: bash run: | aws --region us-west-2 cloudwatch put-metric-data --namespace "AwsSdkKotlin/ArtifactMetrics" --metric-data file://build/reports/metrics/artifacts.json