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:
|
||||
changed-files:
|
||||
name: Get changes
|
||||
name: Get changed files
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
@ -23,17 +23,17 @@ jobs:
|
|||
with:
|
||||
json: true
|
||||
quotepath: false
|
||||
escape_json: false
|
||||
- name: List 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:
|
||||
name: Run Matrix Job
|
||||
runs-on: ubuntu-latest
|
||||
needs: [changed-files]
|
||||
strategy:
|
||||
matrix: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
|
||||
matrix:
|
||||
files: ${{ fromJSON(needs.changed-files.outputs.matrix) }}
|
||||
max-parallel: 4
|
||||
fail-fast: false
|
||||
steps:
|
||||
|
|
|
@ -4,7 +4,7 @@ author: tj-actions
|
|||
|
||||
inputs:
|
||||
separator:
|
||||
description: "Split character for output strings"
|
||||
description: "Split character for output strings."
|
||||
required: false
|
||||
default: " "
|
||||
include_all_old_new_renamed_files:
|
||||
|
@ -24,7 +24,7 @@ inputs:
|
|||
required: false
|
||||
default: ""
|
||||
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"
|
||||
required: false
|
||||
files:
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
describe('main test', () => {
|
||||
it('adds two numbers', async () => {
|
||||
expect(1 + 1).toEqual(2)
|
||||
})
|
||||
})
|
Loading…
Reference in a new issue