fix(ci): mass-release fails loudly instead of silent Skipped (use github.event.inputs)#13
Merged
Merged
Conversation
Symptom: dispatching mass-release with confirm=PUBLISH showed up as "Skipped" with no logs, no error, nothing actionable. Root cause: the job-level guard "if: inputs.confirm == 'PUBLISH'" was not matching. For workflow_dispatch the canonical context is github.event.inputs.*; the unified "inputs.*" context is intended for workflow_call (reusable workflows) and behaves inconsistently in job-level expressions for manually triggered runs. When the expression evaluates to falsy, GitHub silently skips the job — no log to point at. Two changes: - Replace the job-level guard with a "Validate inputs" step that runs unconditionally and exits 1 with a clear ::error:: message if confirm is anything other than the literal string "PUBLISH". The user now sees exactly what value was received. - Replace every "inputs.<x>" reference inside the job with "github.event.inputs.<x>" for consistency. Notably, the publish gate changes from "if: inputs.dry_run != true" (boolean comparison) to "if: github.event.inputs.dry_run != 'true'" (string comparison), since github.event.inputs always exposes inputs as strings. The Validate step echoes confirm/dry_run/include_mcp before checking them, so future debugging is trivial. https://claude.ai/code/session_015jxScBEvdKkRwGvJTgK5Py
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
Você disparou
mass-release.ymlcomconfirm: PUBLISH(correto) e o GitHub Actions devolveu Skipped sem log nenhum, sem erro — impossível diagnosticar.Root cause
O guard estava no nível do job:
Pra
workflow_dispatch, o contexto canônico égithub.event.inputs.*. Oinputs.*"unificado" foi introduzido depois mas é principalmente pensado praworkflow_call(reusable workflows); em expressões a nível de job emworkflow_dispatchele se comporta de forma inconsistente. Quando a expressão é falsy, o GitHub simplesmente pula o job sem log — pior UX possível pra debug.Fix
Validate inputsque roda sempre, fazechodos três inputs e dáexit 1com::error::claro seconfirm != "PUBLISH". Falha alta e visível em vez de Skipped fantasma.inputs.<x>porgithub.event.inputs.<x>no resto do workflow (gate do dry_run,include_mcp, summary). Inclui mudança sutil mas importante:if: inputs.dry_run != true(comparação booleana)if: github.event.inputs.dry_run != 'true'(comparação de string —github.event.inputs.*sempre vem como string, independente dotype: booleandeclarado).Como rodar depois do merge
master).PUBLISH(literal, case-sensitive)Validate inputsvão mostrar exatamente o que o GitHub Actions recebeu.Test plan
mass-release.ymlem dry-run comconfirm: PUBLISH— esperar conclusão verde, sem Skipped.confirm: publish(lowercase) — esperar falha alta com mensagem"The 'confirm' input must be exactly 'PUBLISH'..."em vez de Skipped silencioso.confirm: PUBLISHedry_run: false— esperar push pro NuGet.org dos 23 pacotes novos (Data 6.3.0 + 22 alinhados); EF 6.3.0 é no-op via--skip-duplicate.https://claude.ai/code/session_015jxScBEvdKkRwGvJTgK5Py
Generated by Claude Code