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 57e737f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ 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 +60,19 @@ runs:
EOF
shell: bash

- id: verify-permissions-monitoring-config-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 57e737f

Please sign in to comment.