Skip to content

migrate to the new setup-gradle and dependency-submission actions #772

migrate to the new setup-gradle and dependency-submission actions

migrate to the new setup-gradle and dependency-submission actions #772

name: Dependency Submission
permissions: read-all
on: [ push ]
env:
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
JAVA_VERSION: 21
jobs:
dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.adoptium.net:443
api.github.com:443
caffeine.gradle-enterprise.cloud:443
downloads.gradle.org:443
downloads.gradle-dn.com:443
github.com:443
jcenter.bintray.com:443
objects.githubusercontent.com:443
plugins.gradle.org:443
plugins-artifacts.gradle.org:443
repo.maven.apache.org:443
repo1.maven.org:443
services.gradle.org:443
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
timeout-minutes: 5
with:
action: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with: |
cache: gradle
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
attempt_limit: 3
attempt_delay: 2000
- name: Setup Gradle
uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
timeout-minutes: 5
with:
action: gradle/actions/setup-gradle@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with: |
cache-read-only: false
arguments: help --no-scan
generate-job-summary: false
gradle-home-cache-cleanup: true
attempt_limit: 3
attempt_delay: 2000
- name: Submit Dependency Graph
uses: gradle/actions/dependency-submission@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-beta.6
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}