fix(deps): update aws-java-sdk-v2 monorepo to v2.42.39 #458
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| actions: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: '0' | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| # Skip Gradle wrapper validation due to network issues | |
| # - name: Validate Gradle wrapper | |
| # uses: gradle/wrapper-validation-action@v2 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build with Gradle | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| run: ./gradlew build sonar | |
| - name: Upload test reports | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-reports | |
| path: | | |
| **/build/reports/tests/ | |
| **/build/test-results/ | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Run ktlint | |
| run: ./gradlew ktlintCheck | |
| - name: Upload lint reports | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: lint-reports | |
| path: | | |
| **/build/reports/ktlint/ | |
| dependency-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Check for outdated dependencies | |
| run: ./gradlew dependencyUpdates -Drevision=release | |
| - name: Upload dependency report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dependency-updates-report | |
| path: build/reports/dependencyUpdates/ | |
| publish-snapshots: | |
| needs: [build, lint] | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check if version is SNAPSHOT | |
| id: check-snapshot | |
| run: | | |
| # Get current version from gradle.properties | |
| CURRENT_VERSION=$(grep "^version=" gradle.properties | cut -d'=' -f2) | |
| # Check if it's a SNAPSHOT version | |
| if [[ "$CURRENT_VERSION" =~ -SNAPSHOT$ ]]; then | |
| echo "is_snapshot=true" >> $GITHUB_OUTPUT | |
| echo "Version is a SNAPSHOT: ${CURRENT_VERSION}" | |
| else | |
| echo "is_snapshot=false" >> $GITHUB_OUTPUT | |
| echo "Version is not a SNAPSHOT: ${CURRENT_VERSION} - skipping publish" | |
| fi | |
| - name: Cache Gradle Wrapper | |
| if: steps.check-snapshot.outputs.is_snapshot == 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle-wrapper- | |
| - name: Cache Gradle Dependencies | |
| if: steps.check-snapshot.outputs.is_snapshot == 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle.kts', '**/*.gradle', 'gradle.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle-caches- | |
| - name: Cache TestContainers Images | |
| if: steps.check-snapshot.outputs.is_snapshot == 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.testcontainers | |
| key: ${{ runner.os }}-testcontainers-${{ hashFiles('**/build.gradle.kts') }} | |
| restore-keys: | | |
| ${{ runner.os }}-testcontainers- | |
| - name: Cache Maven Local Repository | |
| if: steps.check-snapshot.outputs.is_snapshot == 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/build.gradle.kts') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Set up JDK 17 | |
| if: steps.check-snapshot.outputs.is_snapshot == 'true' | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| if: steps.check-snapshot.outputs.is_snapshot == 'true' | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build with Gradle | |
| if: steps.check-snapshot.outputs.is_snapshot == 'true' | |
| run: ./gradlew build -x test | |
| - name: Publish to Maven Central SNAPSHOT repository | |
| if: steps.check-snapshot.outputs.is_snapshot == 'true' | |
| env: | |
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} | |
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }} | |
| run: ./gradlew publishAllPublicationsToMavenCentralRepository |