runs-on: ubuntu-latest
if: github.repository == 'vuejs/core' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
steps:
- - uses: actions/github-script@v7
+ - name: Check user permission
+ uses: actions/github-script@v7
with:
script: |
const user = context.payload.sender.login
})
throw new Error('not allowed')
}
- - uses: actions/github-script@v7
+ - name: Get PR info
+ uses: actions/github-script@v7
id: get-pr-data
with:
script: |
return {
num: context.issue.number,
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
env:
COMMENT: ${{ github.event.comment.body }}
prNumber: '' + prData.num,
branchName: prData.branchName,
repo: prData.repo,
- suite: suite === '' ? '-' : suite
+ suite: suite === '' ? '-' : suite,
+ commit: prData.commit
}
})