From ba8801f385b2eccc67d8000a64d0c9a4ae82c8cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Jun 2023 12:11:30 +0200 Subject: [PATCH] Test CI --- .github/workflows/files_changed.yaml | 12 +++++++++--- .github/workflows/phpcsfixer.yml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) 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 }}