Datacap for client #93
Workflow file for this run
This file contains 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
name: Validate Application Trigger | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
pull_request_review: | |
types: | |
- submitted | |
jobs: | |
validate-trigger: | |
runs-on: ubuntu-latest | |
env: | |
DOMAIN: ${{ secrets.DOMAIN }} | |
steps: | |
- name: Call Backend to Validate Application Trigger | |
id: validate | |
run: | | |
echo "Calling backend to validate with pr_number: ${{ github.event.pull_request.number }} and user_handle: ${{ github.actor }}" | |
RESPONSE=$(curl --header "Content-Type: application/json" \ | |
--request POST \ | |
--data '{"pr_number": "'${{ github.event.pull_request.number }}'", "user_handle": "'${{ github.actor }}'"}' \ | |
"${DOMAIN}/application/trigger/validate") | |
echo "Response from validation: $RESPONSE" | |
if [ "$RESPONSE" != "true" ]; then | |
echo "Error: Validation returned false" | |
exit 1 | |
fi | |
- name: Validation Success | |
if: steps.validate.outcome == 'success' | |
run: echo "Validation successful!" |