use an intermediate environment variable

also move emoji-comment script
This commit is contained in:
SaillantNicolas 2022-11-23 15:57:09 +01:00 committed by GitHub
parent d89d6b1b75
commit b404f73370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 10 deletions

View File

@ -47,14 +47,6 @@ jobs:
//get pullrequest url //get pullrequest url
const pr_number = context.payload.issue.number const pr_number = context.payload.issue.number
return pr_number return pr_number
- uses: actions/checkout@v3
name: "checkout branch"
if: steps.get_round.outputs.result != 'stop'
with:
repository: ${{ github.repository }}
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}
fetch-depth: 2
- name: Emoji-comment - name: Emoji-comment
uses: actions/github-script@v6 uses: actions/github-script@v6
@ -67,6 +59,16 @@ jobs:
repo: context.repo.repo, repo: context.repo.repo,
content: 'rocket' content: 'rocket'
}) })
- uses: actions/checkout@v3
name: "checkout branch"
if: steps.get_round.outputs.result != 'stop'
with:
repository: ${{ github.repository }}
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}
fetch-depth: 2
- name: install dependencies - name: install dependencies
if: steps.get_round.outputs.result != 'stop' if: steps.get_round.outputs.result != 'stop'
run: | run: |
@ -151,11 +153,13 @@ jobs:
}); });
- name: Post error - name: Post error
env:
ERRORMSG: ${{steps.build_and_run.outputs.DoxygenError}}
uses: actions/github-script@v6 uses: actions/github-script@v6
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }} if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
with: with:
script: | script: |
const error = `${{steps.build_and_run.outputs.DoxygenError}}` const error = process.env.ERRORMSG
const msg = "There was an error while building the doc: \n"+error const msg = "There was an error while building the doc: \n"+error
github.rest.issues.createComment({ github.rest.issues.createComment({
owner: "CGAL", owner: "CGAL",