diff --git a/.github/actions/pull-requests/check-committed-files/main.js b/.github/actions/pull-requests/check-committed-files/main.js index e87b69d74a..9cf3b7551b 100644 --- a/.github/actions/pull-requests/check-committed-files/main.js +++ b/.github/actions/pull-requests/check-committed-files/main.js @@ -1,7 +1,7 @@ const core = require('@actions/core') // Inputs -const committedFiles = core.getInput('committed-files').split(' ') +const committedFiles = core.getInput('committed-files').split('\n') core.debug(`'committed-files' (input): ${committedFiles}`) // Check if changed and modified files are valid diff --git a/.github/actions/utils.js b/.github/actions/utils.js index 367a1a1d38..a20d8d4786 100644 --- a/.github/actions/utils.js +++ b/.github/actions/utils.js @@ -3,7 +3,7 @@ const path = require('node:path') const wrapperChallengesFolder = 'Roadmap' const excludeExtensions = ['.md', '.json'] -const roadmapPath = path.resolve('..', '..', wrapperChallengesFolder) +const roadmapPath = path.resolve(wrapperChallengesFolder) // Helpers /** diff --git a/.github/workflows/check-pull-request.yml b/.github/workflows/check-pull-request.yml index 2b44f36be2..87abaa73c4 100644 --- a/.github/workflows/check-pull-request.yml +++ b/.github/workflows/check-pull-request.yml @@ -9,17 +9,6 @@ on: - '!Roadmap/**/*.md' jobs: - check-title: - name: Check title - runs-on: ubuntu-latest - steps: - - name: Clone repository to virtual machine - uses: actions/checkout@v4 - - name: Check title of the pull request - uses: ./.github/actions/pull-requests/check-title - with: - title: ${{ github.event.pull_request.title }} - get-committed-files: name: Get committed files runs-on: ubuntu-latest @@ -33,6 +22,19 @@ jobs: - name: Get committed files of the pull request id: changed-files uses: tj-actions/changed-files@v42 + with: + separator: '\n' + + check-title: + name: Check title + runs-on: ubuntu-latest + steps: + - name: Clone repository to virtual machine + uses: actions/checkout@v4 + - name: Check title of the pull request + uses: ./.github/actions/pull-requests/check-title + with: + title: ${{ github.event.pull_request.title }} check-committed-files: needs: [get-committed-files]