Skip to content

Commit

Permalink
fix: use working dir for every run
Browse files Browse the repository at this point in the history
  • Loading branch information
0marperez committed Jan 10, 2025
1 parent 6c00a70 commit 053fe7a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/codebuild-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
uses: ./aws-sdk-kotlin/.github/actions/custom-gradle-distribution-url
- name: Run Service Check Batch and Calculate Artifact Size Metrics
id: svc-check-batch
working-directory: ./aws-sdk-kotlin
run: |
REPOSITORY=$(echo ${{ github.repository }} | cut -d '/' -f 2)
PULL_REQUEST=""
Expand Down Expand Up @@ -119,12 +120,14 @@ jobs:
if: ${{ cancelled() }}
env:
BUILD_ID: ${{ steps.svc-check-batch.outputs.aws-build-id }}
working-directory: ./aws-sdk-kotlin
run: |
if [ ! -z "$BUILD_ID" ]; then
echo "cancelling in-progress batch build: id=$BUILD_ID"
aws codebuild stop-build --id $BUILD_ID
fi
- name: Collect Artifact Size Metrics
working-directory: ./aws-sdk-kotlin
run: |
PULL_REQUEST=""
INTERNAL=${{ github.event.number }}
Expand All @@ -143,6 +146,7 @@ jobs:
./gradlew collectDelegatedArtifactSizeMetrics -PpullRequest=$PULL_REQUEST
- name: Analyze Artifact Size Metrics
working-directory: ./aws-sdk-kotlin
run: ./gradlew analyzeArtifactSizeMetrics
- name: Show Results
uses: actions/github-script@v7
Expand Down Expand Up @@ -197,6 +201,7 @@ jobs:
- name: Evaluate Result
if: ${{ !contains(github.event.pull_request.labels.*.name, 'acknowledge-artifact-size-increase') }}
working-directory: ./aws-sdk-kotlin
run: |
cd build/reports/metrics
cat has-significant-change.txt | grep false || {
Expand All @@ -222,6 +227,7 @@ jobs:
uses: ./aws-sdk-kotlin/.github/actions/custom-gradle-distribution-url
- name: Calculate Artifact Size Metrics
id: svc-check-batch
working-directory: ./aws-sdk-kotlin
run: |
REPOSITORY=$(echo ${{ github.repository }} | cut -d '/' -f 2)
Expand All @@ -234,14 +240,18 @@ jobs:
if: ${{ cancelled() }}
env:
BUILD_ID: ${{ steps.svc-check-batch.outputs.aws-build-id }}
working-directory: ./aws-sdk-kotlin
run: |
if [ ! -z "$BUILD_ID" ]; then
echo "cancelling in-progress batch build: id=$BUILD_ID"
aws codebuild stop-build --id $BUILD_ID
fi
- name: Collect Artifact Size Metrics
working-directory: ./aws-sdk-kotlin
run: ./gradlew collectDelegatedArtifactSizeMetrics -Prelease=${{ github.event.release.tag_name }}
- name: Save Artifact Size Metrics
working-directory: ./aws-sdk-kotlin
run: ./gradlew saveArtifactSizeMetrics -Prelease=${{ github.event.release.tag_name }}
- name: Put Artifact Size Metrics in CloudWatch
working-directory: ./aws-sdk-kotlin
run: ./gradlew putArtifactSizeMetricsInCloudWatch -Prelease=${{ github.event.release.tag_name }}

0 comments on commit 053fe7a

Please sign in to comment.