Skip to content

Only run our workflows on the aerius repository - #398

Merged
JornC merged 1 commit into
aerius:mainfrom
JornC:workflow-repository-guard
Aug 26, 2026
Merged

JornC merged 1 commit into
aerius:mainfrom
JornC:workflow-repository-guard

Conversation

@JornC

@JornC JornC commented Aug 26, 2026

Copy link
Copy Markdown
Member

This is part of a round of mass gha workflow refinements, where up to 2 rules are applied:

  • Rule 1: a workflow only runs when the repository is aerius/IMAER-java
  • Rule 2: a push workflow only triggers on main and the *_fixes branches

For this repo:

Rule 1 is applied to create-release.yml, on-code-push.yml, on-new-tag.yml and on-pull_request-opened-synchronize-reopened.yml
Rule 2 has already been applied


LLM-generated technical summary

A job-level if: github.repository == 'aerius/IMAER-java' stops the job in any fork while leaving behavior in the canonical repo unchanged. It is deliberately at job level rather than inside the shared composite actions in aerius/github-actions: a composite action has no on: block and can only gate individual steps, so a central version would still spin up the runner and run a full build before declining to publish.

On a pull_request event github.repository is the base repository, so the guard is false only when the PR's base is itself a fork. A PR from a fork into the canonical repo is unaffected.

Note for anyone rehearsing a release in their own fork: a guarded job skips silently rather than failing, so the if: line has to come out locally first.

@JornC
JornC merged commit 50646e0 into aerius:main Aug 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants