diff --git a/.github/workflows/files_changed.yaml b/.github/workflows/files_changed.yaml index 2ffaf0a27c6..4e21cbf3c3d 100644 --- a/.github/workflows/files_changed.yaml +++ b/.github/workflows/files_changed.yaml @@ -30,7 +30,8 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: 50 # fetch all history of all branches + ref: ${{ env.BRANCH }} + fetch-depth: 20 # fetch last 10 commits only - name: Get files changed on push # if push on develop or master or main then get diff between current and previous commit @@ -60,16 +61,21 @@ jobs: all_changed_files=${{ steps.files_changed_on_pr.outputs.all_changed_files }} fi - echo all files changed are - + echo All files changed are: echo $all_changed_files + echo Save vars into GITHUB_OUTPUT + echo "all_changed_files=$all_changed_files" >> $GITHUB_OUTPUT + echo "boolean_output=false" >> $GITHUB_OUTPUT + echo "::set-output name=all_changed_files::$all_changed_files" echo "::set-output name=boolean_output::false" for file in $all_changed_files; do echo file = $file if [[ $file == ${{inputs.folder_path}} ]]; then - echo file matches folder_path pattern + echo At least one file was found matching folder_path pattern echo "::set-output name=boolean_output::true" + echo "boolean_output=false" >> $GITHUB_OUTPUT break fi done \ No newline at end of file diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml index 370500011f0..44843ec0baa 100644 --- a/.github/workflows/phpcsfixer.yml +++ b/.github/workflows/phpcsfixer.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 10 - - name: echo all changed files + - name: echo Get list of all changed files run: | echo ${{ needs.filesChanged.outputs.all_changed_files }} echo boolean_output=${{ needs.filesChanged.outputs.boolean_output }}