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

auto-update Dependency Guard baselines for Renovate PRs #935

Merged
merged 1 commit into from
Feb 21, 2023
Merged
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
40 changes: 39 additions & 1 deletion .github/workflows/kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,44 @@ jobs :
arguments : artifactsCheck
cache-read-only: false

dependency-guard :
name : Dependency Guard
runs-on : ubuntu-latest
timeout-minutes : 20
steps :
- uses : actions/checkout@v3
- name : set up JDK 11
uses : actions/setup-java@v3
with :
distribution: 'zulu'
java-version : 11

# If the PR was made by Renovate, automatically update baselines and push so that no one has
# to check out the branch and update the baselines manually.
- name: dependency-guard baseline (used by Renovate)
if: github.actor == 'renovate[bot]'
uses: gradle/gradle-build-action@v2
with:
arguments: dependencyGuardBaseline
cache-read-only: false --refresh-dependencies

# If a non-bot made the pull request, run the non-baseline task which fails on changes.
- name: dependency-guard check (used by everyone but Renovate)
if: github.actor != 'renovate[bot]'
uses: gradle/gradle-build-action@v2
with:
arguments: dependencyGuard
cache-read-only: false --refresh-dependencies

# If dependency-guard generated changes, commit and push those changes. This relies upon the
# 'cancel-stale-jobs' job to cancel the rest of the jobs for the now-stale commit.
- name: commit dependency-guard baseline changes (used by main repo)
if: github.actor == 'renovate[bot]'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: update dependency-guard baseline
commit_options: '--no-verify --signoff'

# These are all pretty quick so we run them on a single shard. Fewer shards, less queueing.
check :
name : Check
Expand All @@ -90,7 +128,7 @@ jobs :
name : Check with Gradle
with :
arguments : |
allTests test apiCheck checkVersionIsSnapshot dependencyGuard lint lintKotlin jvmWorkflowNodeBenchmarkJar --stacktrace --continue
allTests test apiCheck checkVersionIsSnapshot lint lintKotlin jvmWorkflowNodeBenchmarkJar --stacktrace --continue
cache-read-only: false

# Report as Github Pull Request Check.
Expand Down