Update build_doc.yml

This commit is contained in:
Laurent Rineau 2024-09-15 22:14:19 +02:00 committed by GitHub
parent 0306f70bb0
commit 5e6f624dc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 4 deletions

View File

@ -44,8 +44,8 @@ jobs:
- name: Check comment body
id: check_comment_body
env:
trigger_build: ${{ inputs.pr_number || startsWith(env.comment_body, '/build:') || startsWith(env.comment_body, '/force-build:') }}
force_build: ${{ inputs.force_build || startsWith(env.comment_body, '/force-build:') }}
trigger_build: ${{ inputs && inputs.pr_number || startsWith(env.comment_body, '/build:') || startsWith(env.comment_body, '/force-build:') }}
force_build: ${{ inputs && inputs.force_build || startsWith(env.comment_body, '/force-build:') }}
if: inputs.pr_number || startsWith(env.comment_body, '/build:') || startsWith(env.comment_body, '/force-build:')
run: |
if [ "${trigger_build}" = "false" ]; then
@ -55,15 +55,20 @@ jobs:
echo "force_build=${force_build}" >> $GITHUB_OUTPUT
- name: Check permissions
id: check_permissions
if: inputs.pr_number || env.author_association == 'OWNER' || env.author_association == 'MEMBER'
run: echo "Authorized"
- name: No permissions
if: ! inputs.pr_number && env.author_association != 'OWNER' || env.author_association != 'MEMBER'
run: |
echo "Not Authorized"
exit 1
- name: Get PR number
id: get_pr_number
env:
pr_number: ${{ inputs.pr_number || github.event.issue.number }}
run: echo "pr_number=${{ inputs.pr_number }}" >> $GITHUB_OUTPUT
run: echo "pr_number=$pr_number" >> $GITHUB_OUTPUT
- name: Get doc version
uses: actions/github-script@v7