diff --git a/.github/workflows/client-build.yml b/.github/workflows/client-build.yml index 8533c26c60..48b0f8fa26 100644 --- a/.github/workflows/client-build.yml +++ b/.github/workflows/client-build.yml @@ -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}) diff --git a/.github/workflows/scripts/client-build-compliance.js b/.github/workflows/scripts/client-build-compliance.js index 7531ad1037..dc0ec4d80f 100644 --- a/.github/workflows/scripts/client-build-compliance.js +++ b/.github/workflows/scripts/client-build-compliance.js @@ -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,