Skip to content

ci: drop unneeded publish env from non-secret-using lint jobs#222

Merged
Nelson-PROIA merged 2 commits into
mainfrom
chore/remove-unneeded-publish-env-from-test-workflow
May 21, 2026
Merged

ci: drop unneeded publish env from non-secret-using lint jobs#222
Nelson-PROIA merged 2 commits into
mainfrom
chore/remove-unneeded-publish-env-from-test-workflow

Conversation

@Nelson-PROIA

@Nelson-PROIA Nelson-PROIA commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Two workflows have a non-secret-using job pinned to environment: publish:

  • test_custom_code.yaml (lint + build + unit tests)
  • run_example_scripts.yaml's lint job (build only)

Neither references any secret, so the env declaration adds no security but does cause friction:

  • Forces the env approval flow on every PR
  • Limits the workflow to branches whitelisted in the publish environment's branch policy (currently only main)
  • Causes the lint check to fail immediately on any feature branch that is not whitelisted

This PR removes those env declarations. The examples job in run_example_scripts.yaml keeps environment: publish since it actually uses MISTRAL_API_KEY.

The test_custom_code workflow runs lint, build, and unit tests, and
does not reference any secrets. Pinning it to the publish environment
forces the env approval flow on every PR and limits it to the branches
allowed by the publish environment's branch policy, which causes
unnecessary failures for feature branches that are not whitelisted.
Same fix as the test workflow: the lint job in run_example_scripts
only builds, no secrets. The examples job below it keeps env: publish
since it actually uses MISTRAL_API_KEY.
@Nelson-PROIA Nelson-PROIA changed the title ci: drop unneeded publish env from test workflow ci: drop unneeded publish env from non-secret-using lint jobs May 20, 2026
@andreaonofrei01
andreaonofrei01 self-requested a review May 20, 2026 17:38

@andreaonofrei01 andreaonofrei01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@Nelson-PROIA
Nelson-PROIA merged commit d720974 into main May 21, 2026
3 checks 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