Skip to content

Commit

Permalink
Print error annotations if inputs fail validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jsf9k committed Feb 23, 2025
1 parent 6ef9925 commit f821704
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ runs:
${{ inputs.harden_runner_egress_policy }} = block ]]
shell: bash

- id: harden-runner-egress-policy-verification-failure
name: >-
Output an annotation if verification of
harden_runner_egress_policy input fails
run: echo ::error Input harden_runner_egress_policy is not a valid value.
shell: bash
if: |
${{ failure() &&
steps.verify-harden-runner-egress-policy.conclusion ==
"failure" }}
- id: verify-permissions-monitoring-config
name: Verify that permissions_monitoring_config input is valid JSON
run: |
Expand All @@ -47,6 +58,17 @@ runs:
EOF
shell: bash

- id: harden-runner-egress-policy-verification-failure
name: >-
Output an annotation if verification of
permissions_monitoring_config input fails
run: echo ::error Input permissions_monitoring_config is not valid JSON.
shell: bash
if: |
${{ failure() &&
steps.verify-permissions-monitoring-config.conclusion ==
"failure" }}
- id: monitor-actions-permissions
name: Monitor GitHub Actions permissions
uses: GitHubSecurityLab/actions-permissions/monitor@v1
Expand Down

0 comments on commit f821704

Please sign in to comment.