Skip to content

Fix credential cleanup when env exports are disabled#524

Open
1seal wants to merge 1 commit intogoogle-github-actions:mainfrom
1seal:codex/gha-auth-cleanup-state
Open

Fix credential cleanup when env exports are disabled#524
1seal wants to merge 1 commit intogoogle-github-actions:mainfrom
1seal:codex/gha-auth-cleanup-state

Conversation

@1seal
Copy link

@1seal 1seal commented Mar 10, 2026

summary

this decouples post-step credentials cleanup from export_environment_variables.

when create_credentials_file=true and cleanup_credentials=true, the action now saves the created credentials path with saveState in the main step and reads it with getState in the post step. this keeps cleanup working even when export_environment_variables=false.

changes

  • save the created credentials path in src/main.ts
  • read saved state first in src/post.ts, with env var fallback
  • add a regression test covering the no-env-export cleanup path
  • rebuild dist/main and dist/post

testing

  • npm test
  • npm run build

@1seal 1seal requested a review from a team as a code owner March 10, 2026 11:46
@1seal 1seal requested review from R2wenD2 and haroonc March 10, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant