Skip to content

fix: add projen action overrides to prevent self-mutation with setup-java and setup-dotnet v4#93

Merged
archit017 merged 1 commit intomainfrom
fix/workflow-action-versions
Mar 4, 2026
Merged

fix: add projen action overrides to prevent self-mutation with setup-java and setup-dotnet v4#93
archit017 merged 1 commit intomainfrom
fix/workflow-action-versions

Conversation

@archit017
Copy link
Copy Markdown
Contributor

Summary

Fixes self-mutation issue where actions/setup-java and actions/setup-dotnet were being reverted from v4 to v3 during CI builds.

Changes

Added projen action version overrides in .projenrc.ts:

project.github?.actions.set("actions/setup-java", "actions/setup-java@v4");
project.github?.actions.set("actions/setup-dotnet", "actions/setup-dotnet@v4");

Why This Fix Works

The self-mutation issue occurred because:

  1. The workflow files were manually updated to use v4 versions
  2. Projen's default versions are v3, so when npx projen ran during CI builds, it regenerated the workflows with v3, causing a diff
  3. This fix configures projen to always use v4 for these actions, preventing future self-mutation

Testing

  • Ran npx projen locally and verified workflow files maintain v4 versions
  • No changes to workflow files when regenerating (no self-mutation)

@archit017 archit017 merged commit 883356d into main Mar 4, 2026
7 checks passed
@archit017 archit017 deleted the fix/workflow-action-versions branch March 4, 2026 19:11
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