Skip to content

build: improve GHA workflow experience for forks#8285

Merged
nhumblot merged 2 commits intodependency-check:mainfrom
chadlwilson:fork-friendliness
Feb 8, 2026
Merged

build: improve GHA workflow experience for forks#8285
nhumblot merged 2 commits intodependency-check:mainfrom
chadlwilson:fork-friendliness

Conversation

@chadlwilson
Copy link
Copy Markdown
Collaborator

Description of Change

Makes some minor tweaks to the workflows to remove noise for forks:

  • only tries to locate and run release/deploy with GPG signing on the main org
  • disables scheduled workflows on forks (FP cleanup, thread locking
  • cleans up codacy, as seems that's not coming back?

Without this I get failed build notifications every time I sync main from origin and occasionally for scheduled builds. I sometimes run workflows on my fork to be able to open dummy PRs to reduce noise for other maintainers before I open real PRs.

I left CodeQL there/scheduled, and ability to run with/play with FP workflows in some fashion.

Related issues

N/A

Have test cases been added to cover the new functionality?

N/A

@chadlwilson chadlwilson requested a review from Copilot February 7, 2026 17:40
Some of these won't work on forks due to missing secrets or use unnecessary compute. An alternative would be to run them if the secret is present, but that seems less explicit as to intent.

Signed-off-by: Chad Wilson <[email protected]>
Comment on lines -126 to -128
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
Copy link
Copy Markdown
Collaborator Author

@chadlwilson chadlwilson Feb 7, 2026

Choose a reason for hiding this comment

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

These are not present on the PR workflow, so appear to be unnecessary.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces GitHub Actions noise and failures on forked repositories by gating release/deploy/signing and maintenance automation to only run on the upstream dependency-check org, and by removing legacy Codacy references.

Changes:

  • Gate release workflow execution to only run on the upstream org (github.repository_owner == 'dependency-check').
  • Prevent fork runs from attempting GPG import and Maven deploy/signing during snapshot builds.
  • Disable scheduled maintenance jobs (thread locking, false-positive cleanup) on forks; remove Codacy badge and old Codacy coverage job stubs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Removes Codacy badge reference.
.github/workflows/release.yml Skips release pipeline on forks by gating the build job to upstream org.
.github/workflows/lock.yml Prevents scheduled/manual lock job from running on forks.
.github/workflows/false-positive-cleanup.yml Prevents scheduled/manual cleanup job from running on forks.
.github/workflows/build.yml Gates GPG import and conditionally enables Maven signing/deploy only when GPG install succeeded (upstream org).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@nhumblot nhumblot left a comment

Choose a reason for hiding this comment

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

praise: Thank you for this proposal and the heads-up! I no longer use forks due to commit rights on the main repository and have lost touch with the process. This is unfortunate, as it’s important to have a smooth workflow for external contributors. I’ll consider making PRs from forks occasionally to experience the process from an external perspective.

@nhumblot nhumblot merged commit ffc6838 into dependency-check:main Feb 8, 2026
5 checks passed
@nhumblot nhumblot added this to the 12.2.1 milestone Feb 8, 2026
@chadlwilson chadlwilson deleted the fork-friendliness branch February 8, 2026 08:12
@nhumblot
Copy link
Copy Markdown
Collaborator

nhumblot commented Feb 8, 2026

CodeQL jobs - no changes detected ✔️

Build and deploy snapshot jobs - no changes detected ✔️

@chadlwilson
Copy link
Copy Markdown
Collaborator Author

Yeah, it's no big deal - just some noise notifications occasionally. The main PR workflow works fine when opened to ones own fork. 👍

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants