mirror of https://github.com/vuejs/core.git
workflow: pass along commit to ecosystem-ci pr workflow
This commit is contained in:
parent
ca41b9202a
commit
7a6c6652e0
|
@ -9,7 +9,8 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'vuejs/core' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
|
if: github.repository == 'vuejs/core' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v7
|
- name: Check user permission
|
||||||
|
uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const user = context.payload.sender.login
|
const user = context.payload.sender.login
|
||||||
|
@ -43,7 +44,8 @@ jobs:
|
||||||
})
|
})
|
||||||
throw new Error('not allowed')
|
throw new Error('not allowed')
|
||||||
}
|
}
|
||||||
- uses: actions/github-script@v7
|
- name: Get PR info
|
||||||
|
uses: actions/github-script@v7
|
||||||
id: get-pr-data
|
id: get-pr-data
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -56,9 +58,11 @@ jobs:
|
||||||
return {
|
return {
|
||||||
num: context.issue.number,
|
num: context.issue.number,
|
||||||
branchName: pr.head.ref,
|
branchName: pr.head.ref,
|
||||||
repo: pr.head.repo.full_name
|
repo: pr.head.repo.full_name,
|
||||||
|
commit: pr.head.sha
|
||||||
}
|
}
|
||||||
- uses: actions/github-script@v7
|
- name: Trigger run
|
||||||
|
uses: actions/github-script@v7
|
||||||
id: trigger
|
id: trigger
|
||||||
env:
|
env:
|
||||||
COMMENT: ${{ github.event.comment.body }}
|
COMMENT: ${{ github.event.comment.body }}
|
||||||
|
@ -80,6 +84,7 @@ jobs:
|
||||||
prNumber: '' + prData.num,
|
prNumber: '' + prData.num,
|
||||||
branchName: prData.branchName,
|
branchName: prData.branchName,
|
||||||
repo: prData.repo,
|
repo: prData.repo,
|
||||||
suite: suite === '' ? '-' : suite
|
suite: suite === '' ? '-' : suite,
|
||||||
|
commit: prData.commit
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue