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

Validate Gradle wrapper #1501

Merged
merged 1 commit into from Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/verify-gradle-wrapper.yaml
@@ -0,0 +1,11 @@
name: Validate Gradle wrapper
on: [pull_request, push]
jobs:
build_pr:
if: github.repository_owner == 'jenkinsci'
Copy link
Member

Choose a reason for hiding this comment

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

Does this work on forks with this if?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes: https://github.com/jenkinsci/acceptance-test-harness/actions/workflows/verify-gradle-wrapper.yaml

The if-clause context refers to the owner of the repository where the workflow is running, not where the PR is coming from.
The job would only be skipped if you file a PR on your fork towards your fork.

runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2