mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-16 09:27:57 +00:00
chore: simplify matrix example workflow (#1719)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
parent
6d07b6ee59
commit
05bdc91228
3 changed files with 7 additions and 12 deletions
10
.github/workflows/matrix-test.yml
vendored
10
.github/workflows/matrix-test.yml
vendored
|
@ -8,10 +8,10 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
changed-files:
|
changed-files:
|
||||||
name: Get changes
|
name: Get changed files
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -23,17 +23,17 @@ jobs:
|
||||||
with:
|
with:
|
||||||
json: true
|
json: true
|
||||||
quotepath: false
|
quotepath: false
|
||||||
|
escape_json: false
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
|
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
|
||||||
- id: set-matrix
|
|
||||||
run: echo "matrix={\"files\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
matrix-job:
|
matrix-job:
|
||||||
name: Run Matrix Job
|
name: Run Matrix Job
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [changed-files]
|
needs: [changed-files]
|
||||||
strategy:
|
strategy:
|
||||||
matrix: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
|
matrix:
|
||||||
|
files: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
|
||||||
max-parallel: 4
|
max-parallel: 4
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -4,7 +4,7 @@ author: tj-actions
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
separator:
|
separator:
|
||||||
description: "Split character for output strings"
|
description: "Split character for output strings."
|
||||||
required: false
|
required: false
|
||||||
default: " "
|
default: " "
|
||||||
include_all_old_new_renamed_files:
|
include_all_old_new_renamed_files:
|
||||||
|
@ -24,7 +24,7 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
files_from_source_file_separator:
|
files_from_source_file_separator:
|
||||||
description: 'Separator used to split the `files_from_source_file` input'
|
description: "Separator used to split the `files_from_source_file` input."
|
||||||
default: "\n"
|
default: "\n"
|
||||||
required: false
|
required: false
|
||||||
files:
|
files:
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
describe('main test', () => {
|
|
||||||
it('adds two numbers', async () => {
|
|
||||||
expect(1 + 1).toEqual(2)
|
|
||||||
})
|
|
||||||
})
|
|
Loading…
Reference in a new issue