diff --git a/.github/workflows/manifest-ci-check.yml b/.github/workflows/manifest-ci-check.yml index 9102323cfe..d11585cd5c 100644 --- a/.github/workflows/manifest-ci-check.yml +++ b/.github/workflows/manifest-ci-check.yml @@ -12,19 +12,20 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/checkout@v3 - - id: set-matrix - run: echo "::set-output name=matrix::$(ls manifests/**/opensearch*.yml | awk -F/ '{if($2<2)print$0}' | jq -R -s -c 'split("\n")[:-1]')" + - name: Checkout + uses: actions/checkout@v3 + - name: Get changed manifest files + uses: tj-actions/changed-files@v39 + id: list-changed-manifests + with: + files: manifests/**/opensearch*.yml + json: true + quotepath: false + dir_names: false - list-manifests17: - if: ${{ github.repository == 'gaiksaya/opensearch-build' && github.event.label.name == 'manifest-ci-check' }} - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v3 - - id: set-matrix - run: echo "::set-output name=matrix::$(ls manifests/**/opensearch*.yml | awk -F/ '{if($2>2)print$0}' | jq -R -s -c 'split("\n")[:-1]')" + - name: Set unique changed manifests as matrix + id: set-matrix + run: echo "matrix={\"manifest\":${{ steps.list-changed-manifests.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT" manifest-checks-jdk11: