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 27689a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ runs:
name: Verify that harden_runner_egress_policy input is a valid value
run: >-
[[ ${{ inputs.harden_runner_egress_policy }} = audit ||
${{ inputs.harden_runner_egress_policy }} = block ]]
${{ inputs.harden_runner_egress_policy }} = block ]] ||
echo ::error Input harden_runner_egress_policy is not a valid value.
shell: bash

- id: verify-permissions-monitoring-config
name: Verify that permissions_monitoring_config input is valid JSON
run: |
jq . >> /dev/null <<EOF
${{ inputs.permissions_monitoring_config }}
EOF
EOF || echo ::error Input permissions_monitoring_config is not valid JSON.
shell: bash

- id: monitor-actions-permissions
Expand Down

0 comments on commit 27689a7

Please sign in to comment.