feat: add support for complex filters (#1265)
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: tj-actions[bot] <109116665+tj-actions-bot@users.noreply.github.com>
This commit is contained in:
70
.github/workflows/test.yml
vendored
70
.github/workflows/test.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
- name: shellcheck
|
||||
uses: reviewdog/action-shellcheck@v1.17
|
||||
@@ -188,7 +188,7 @@ jobs:
|
||||
if: github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
@@ -245,7 +245,7 @@ jobs:
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
@@ -282,7 +282,7 @@ jobs:
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
@@ -318,7 +318,7 @@ jobs:
|
||||
input-fetch_depth: [1, 50]
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
@@ -348,7 +348,7 @@ jobs:
|
||||
if: github.event_name != 'push'
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
@@ -380,7 +380,7 @@ jobs:
|
||||
fetch-depth: [1, 2, 0]
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: ${{ matrix.fetch-depth }}
|
||||
@@ -408,7 +408,7 @@ jobs:
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download build assets
|
||||
@@ -461,7 +461,7 @@ jobs:
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download build assets
|
||||
@@ -519,7 +519,7 @@ jobs:
|
||||
fetch-depth: [0, 1, 2]
|
||||
|
||||
steps:
|
||||
- name: Checkout to branch
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
@@ -550,6 +550,56 @@ jobs:
|
||||
echo "${{ toJSON(steps.changed-files.outputs) }}"
|
||||
shell:
|
||||
bash
|
||||
test-yaml:
|
||||
name: Test changed-files with yaml
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
fetch-depth: [0, 1, 2]
|
||||
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
submodules: recursive
|
||||
fetch-depth: ${{ matrix.fetch-depth }}
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
- name: Run changed-files with files_yaml
|
||||
id: changed-files
|
||||
uses: ./
|
||||
with:
|
||||
files_yaml: |
|
||||
test:
|
||||
- test/**.txt
|
||||
- test/**.md
|
||||
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files.outputs) }}"
|
||||
shell:
|
||||
bash
|
||||
|
||||
- name: Run changed-files with files_yaml_from_source_file
|
||||
id: changed-files-from-source-file
|
||||
uses: ./
|
||||
with:
|
||||
files_yaml_from_source_file: |
|
||||
test/changed-files.yml
|
||||
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-from-source-file.outputs) }}"
|
||||
shell:
|
||||
bash
|
||||
|
||||
test:
|
||||
name: Test changed-files
|
||||
|
||||
Reference in New Issue
Block a user