Skip to content

Expose structured action outputs and add fail_on_warn input #4

@oto-macenauer-absa

Description

@oto-macenauer-absa

Feature Description

The action currently declares no structured outputs:, making it impossible for callers to branch on the result programmatically. Additionally, there is no way to configure the action to fail the job when certificates are expiring soon.

Problem / Opportunity

Callers who want to send a Slack alert only on failures, or open a ticket only when warn_count > 0, have no machine-readable signal to act on. Teams with strict certificate hygiene may also want to fail CI if any cert is within warning_days of expiry.

Acceptance Criteria

  • action.yml declares outputs: with: result (pass | warn | fail), fail_count, warn_count
  • The bash step emits these via echo "key=value" >> "$GITHUB_OUTPUT"
  • A new boolean input fail_on_warn (default: false) causes exit 1 when WARN_COUNT > 0
  • README Inputs and Outputs sections are updated to document all three outputs and the new input

Proposed Solution

Add an outputs: block in action.yml referencing a named step id. Emit values at the end of the bash logic before the final exit. Add fail_on_warn input with a guard: if [[ "${INPUT_FAIL_ON_WARN}" == "true" && $WARN_COUNT -gt 0 ]].

Dependencies / Related

None.

Additional Context

None.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions