ci: Get PR number from env variable
This commit is contained in:
parent
2459607a3f
commit
e9102d5085
4
.github/workflows/client-build.yml
vendored
4
.github/workflows/client-build.yml
vendored
|
|
@ -84,12 +84,12 @@ jobs:
|
|||
echo "One or more files in the server folder has changed."
|
||||
echo "List all the files that have changed: $ALL_CHANGED_FILES"
|
||||
|
||||
# get all the files changes in the cypress/e2e folder
|
||||
- name: Get added files in cypress/e2e folder
|
||||
- name: Check compliance
|
||||
if: inputs.pr != 0 && steps.changed-files-specific.outputs.any_changed == 'true'
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
NODE_PATH: "${{ github.workspace }}/.github/workflows/scripts"
|
||||
PR_NUMBER: ${{ inputs.pr }}
|
||||
with:
|
||||
script: |
|
||||
await require("client-build-compliance.js")({core, github, context})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = async ({core, github, context}) => {
|
||||
const prNumber = context.payload.inputs.pr;
|
||||
const prNumber = process.env.PR_NUMBER;
|
||||
|
||||
const affectedFiles = await github.paginate(github.rest.pulls.listFiles, {
|
||||
owner: context.repo.owner,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user