Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
aajtodd committed Feb 21, 2024
1 parent c26c3bc commit 6946470
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/artifact-size-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,14 +42,16 @@ 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
uses: actions/github-script@v7
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,
Expand All @@ -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
Expand All @@ -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

0 comments on commit 6946470

Please sign in to comment.