SUPINT-2380: nuxeo admin console web scripts works #7
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: Check PR Checkboxes | |
on: | |
pull_request: | |
types: [opened, edited, synchronize] | |
jobs: | |
check-pr-body: | |
runs-on: ubuntu-latest | |
outputs: | |
run_lint: ${{ steps.check.outputs.run_lint }} | |
run_build: ${{ steps.check.outputs.run_build }} | |
run_utest: ${{ steps.check.outputs.run_utest }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Check PR body for checkboxes | |
id: check | |
run: | | |
PR_BODY=$(jq -r '.pull_request.body' "$GITHUB_EVENT_PATH") | |
if echo "$PR_BODY" | grep -q '\- \[ \] Run Lint'; then | |
echo "run_lint=true" >> $GITHUB_ENV | |
echo "::set-output name=run_lint::true" | |
else | |
echo "run_lint=false" >> $GITHUB_ENV | |
echo "::set-output name=run_lint::false" | |
fi | |
if echo "$PR_BODY" | grep -q '\- \[ \] Run Build'; then | |
echo "run_build=true" >> $GITHUB_ENV | |
echo "::set-output name=run_build::true" | |
else | |
echo "run_build=false" >> $GITHUB_ENV | |
echo "::set-output name=run_build::false" | |
fi | |
if echo "$PR_BODY" | grep -q '\- \[ \] Run Unit Tests'; then | |
echo "run_utest=true" >> $GITHUB_ENV | |
echo "::set-output name=run_utest::true" | |
else | |
echo "run_utest=false" >> $GITHUB_ENV | |
echo "::set-output name=run_utest::false" | |
fi |