Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gradle/actions action to v4 #6618

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/benchmark-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
distribution: temurin
java-version: 17

- uses: gradle/actions/setup-gradle@v3
with:
arguments: |
jmhJar
- name: Set up gradle
uses: gradle/actions/setup-gradle@v4
- name: Run jmh
run: ./gradlew jmhJar
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
distribution: temurin
java-version: 17

- uses: gradle/actions/setup-gradle@v3
with:
arguments: |
jmhJar
- name: Set up gradle
uses: gradle/actions/setup-gradle@v4
- name: Run jmh
run: ./gradlew jmhJar
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ jobs:
distribution: temurin
java-version: 17

- uses: gradle/actions/setup-gradle@v3
with:
arguments: |
build
- name: Set up gradle
uses: gradle/actions/setup-gradle@v4
- name: Build
run: >
./gradlew build
${{ matrix.coverage && 'jacocoTestReport' || '' }}
-PtestJavaVersion=${{ matrix.test-java-version }}
-Porg.gradle.java.installations.paths=${{ steps.setup-java-test.outputs.path }},${{ steps.setup-java.outputs.path }}
Expand Down Expand Up @@ -134,12 +135,16 @@ jobs:
distribution: temurin
java-version: 17

- uses: gradle/actions/setup-gradle@v3
- name: Set up gradle
uses: gradle/actions/setup-gradle@v4
# skipping release branches because the versions in those branches are not snapshots
# (also this skips pull requests)
if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplication is unfortunate.. Nice to only have to write the condition once

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's true. Maybe down the road we can use a variable for this? I dunno.

- name: Publish to Sonatype
run: ./gradlew assemble publishToSonatype
# skipping release branches because the versions in those branches are not snapshots
# (also this skips pull requests)
if: ${{ github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-java' }}
with:
arguments: assemble publishToSonatype
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/codeql-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ jobs:
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
tools: latest

- uses: gradle/actions/setup-gradle@v3
with:
# skipping build cache is needed so that all modules will be analyzed
arguments: assemble --no-build-cache
- name: Set up gradle
uses: gradle/actions/setup-gradle@v4
- name: Assemble
# skipping build cache is needed so that all modules will be analyzed
run: ./gradlew assemble --no-build-cache

- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: gradle/actions/wrapper-validation@v3.5.0
- uses: gradle/actions/wrapper-validation@v4.0.0
7 changes: 4 additions & 3 deletions .github/workflows/owasp-dependency-check-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ jobs:
distribution: temurin
java-version: 17

- uses: gradle/actions/setup-gradle@v3
with:
arguments: "dependencyCheckAnalyze"
- name: Set up gradle
uses: gradle/actions/setup-gradle@v4
- name: Check dependencies
run: ./gradlew dependencyCheckAnalyze

- name: Upload report
if: always()
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
distribution: temurin
java-version: 17

- name: Set up gradle
uses: gradle/actions/setup-gradle@v4

- name: Build and publish artifacts
uses: gradle/actions/setup-gradle@v3
with:
arguments: assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
run: ./gradlew assemble publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
Expand Down
Loading