Skip to content

Add action

Add action #5

Workflow file for this run

name: External validation
on:
pull_request:
branches:
- "main"
jobs:
validate:
runs-on: ubuntu-latest
outputs:
response: ${{ steps.fetch.outputs.response }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch
id: fetch
run: |
response="Mario"; echo "response=$response" >> $GITHUB_OUTPUT
fail:
needs: validate
runs-on: ubuntu-latest
if: ${{ needs.validate.outputs.response }}
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "${{ needs.validate.outputs.response }}"
})
- name: Fail
run: |
echo ${{ needs.validate.outputs.response }}
exit 1