This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new d21f040620 Migrate to new changes filter action in CI (#10812)
d21f040620 is described below

commit d21f040620ff5f59b160896fc378d00819125d05
Author: Superskyyy <[email protected]>
AuthorDate: Mon May 22 21:41:15 2023 -0400

    Migrate to new changes filter action in CI (#10812)
---
 .github/workflows/skywalking.yaml | 78 +++++++++++++++++++++++----------------
 1 file changed, 46 insertions(+), 32 deletions(-)

diff --git a/.github/workflows/skywalking.yaml 
b/.github/workflows/skywalking.yaml
index 03d0c6d3b0..67a9ac1de5 100644
--- a/.github/workflows/skywalking.yaml
+++ b/.github/workflows/skywalking.yaml
@@ -107,40 +107,54 @@ jobs:
     if: github.event_name != 'schedule'
     timeout-minutes: 10
     outputs:
-      oap: ${{ steps.filter.outputs.oap }}
-      pom: ${{ steps.filter.outputs.pom }}
-      ui: ${{ steps.filter.outputs.ui }}
+      oap: ${{ steps.filter-oap.outputs.any_modified }}
+      pom: ${{ steps.filter-pom.outputs.any_modified }}
+      ui: ${{ steps.filter-ui.outputs.any_modified }}
     steps:
       - uses: actions/checkout@v3 # required for push event
-      - name: Check for file changes
-        uses: getsentry/paths-filter@v2
-        id: filter
-        with:
-          token: ${{ github.token }}
-          # The following is a single composite pattern that allows next CI 
steps,
-          # the pattern is in form of [not (foo or bar)] to be safe.
-          # When new files come in, the CI will NOT ignore them unless listed,
-          # so remember to extend here if they do not serve functional 
purposes.
-          # NOTE: careful with using ** in expression, keep !**/{old, new 
things}.
-          filters: |
-            oap:
-              - "!**/{\
-              *.md,*.txt,\
-              skywalking-ui,\
-              .asf.yaml,.dlc.json,.gitignore,.licenserc.yaml,\
-              codeStyle.xml,\
-              HEADER,LICENSE,NOTICE,\
-              docs/**,\
-              .github/workflows/codeql.yaml,\
-              .github/(ISSUE_TEMPLATE/**|PULL_REQUEST_TEMPLATE),\
-              dist-material/release-docs/**,\
-              component-libraries.yml\
-              }"
-            pom:
-              - "**/pom.xml"
-            ui:
-              - "skywalking-ui"
-          list-files: json # logs matched files
+        with:
+          fetch-depth: 0
+      - name: Filter OAP
+        id: filter-oap
+        # The GHA version is pinned by infra
+        uses: tj-actions/[email protected]
+        with:
+          files_ignore: |
+            **/*.{md,txt}
+            skywalking-ui
+            .asf.yaml
+            .dlc.json
+            .gitignore
+            .licenserc.yaml
+            codeStyle.xml
+            HEADER
+            LICENSE
+            NOTICE
+            docs/**
+            .github/workflows/codeql.yaml
+            .github/ISSUE_TEMPLATE/**
+            .github/PULL_REQUEST_TEMPLATE
+            dist-material/release-docs/**
+            component-libraries.yml
+      - name: Filter POM
+        id: filter-pom
+        uses: tj-actions/[email protected]
+        with:
+          files: |
+            **/pom.xml
+      - name: Filter UI
+        id: filter-ui
+        uses: tj-actions/[email protected]
+        with:
+          files: |
+            skywalking-ui
+      - name: List all modified files
+        if: steps.filter-oap.outputs.any_modified == 'true' || 
steps.filter-ui.outputs.any_modified == 'true' || 
steps.filter-pom.outputs.any_modified == 'true'
+        run: |
+          echo "Files that have changed or modified:"
+          echo "OAP: ${{ 
steps.filter-oap.outputs.all_changed_and_modified_files }}"
+          echo "POM: ${{ 
steps.filter-pom.outputs.all_changed_and_modified_files }}"
+          echo "UI: ${{ steps.filter-ui.outputs.all_changed_and_modified_files 
}}"
 
   dist-tar:
     if: |

Reply via email to