mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 03:47:20 +00:00
Merge branch 'main' into feat/add-support-for-dir-names-max-depth
This commit is contained in:
commit
e54a2423a8
2 changed files with 11 additions and 14 deletions
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
|
@ -946,19 +946,18 @@ jobs:
|
||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v6
|
uses: tj-actions/branch-names@v6
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- uses: nrwl/last-successful-commit-action@v1
|
- uses: nrwl/nx-set-shas@v3
|
||||||
id: last_successful_commit
|
id: last_successful_commit
|
||||||
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
||||||
with:
|
with:
|
||||||
branch: ${{ steps.branch-name.outputs.base_ref_branch }}
|
main-branch-name: ${{ steps.branch-name.outputs.base_ref_branch }}
|
||||||
workflow_id: 'test.yml'
|
workflow-id: 'test.yml'
|
||||||
github_token: ${{ secrets.PAT_TOKEN }}
|
|
||||||
- name: Run changed-files with a custom base sha
|
- name: Run changed-files with a custom base sha
|
||||||
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
||||||
id: changed-files-custom-base-sha
|
id: changed-files-custom-base-sha
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
|
base_sha: ${{ steps.last_successful_commit.outputs.base }}
|
||||||
- name: Show output
|
- name: Show output
|
||||||
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
||||||
run: |
|
run: |
|
||||||
|
|
16
README.md
16
README.md
|
@ -466,18 +466,17 @@ See [inputs](#inputs) for more information.
|
||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v6
|
uses: tj-actions/branch-names@v6
|
||||||
|
|
||||||
- uses: nrwl/last-successful-commit-action@v1
|
- uses: nrwl/nx-set-shas@v3
|
||||||
id: last_successful_commit_push
|
id: last_successful_commit_push
|
||||||
with:
|
with:
|
||||||
branch: ${{ steps.branch-name.outputs.current_branch }} # Get the last successful commit for the current branch.
|
main-branch-name: ${{ steps.branch-name.outputs.current_branch }} # Get the last successful commit for the current branch.
|
||||||
workflow_id: 'test.yml'
|
workflow-id: 'test.yml'
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Run changed-files with the commit of the last successful test workflow run
|
- name: Run changed-files with the commit of the last successful test workflow run
|
||||||
id: changed-files-base-sha-push
|
id: changed-files-base-sha-push
|
||||||
uses: tj-actions/changed-files@v34
|
uses: tj-actions/changed-files@v34
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_push.outputs.commit_hash }}
|
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -494,18 +493,17 @@ See [inputs](#inputs) for more information.
|
||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v5
|
uses: tj-actions/branch-names@v5
|
||||||
|
|
||||||
- uses: nrwl/last-successful-commit-action@v1
|
- uses: nrwl/nx-set-shas@v3
|
||||||
id: last_successful_commit_pull_request
|
id: last_successful_commit_pull_request
|
||||||
with:
|
with:
|
||||||
branch: ${{ steps.branch-name.outputs.base_ref_branch }} # Get the last successful commit on master or main branch
|
main-branch-name: ${{ steps.branch-name.outputs.base_ref_branch }} # Get the last successful commit on master or main branch
|
||||||
workflow_id: 'test.yml'
|
workflow_id: 'test.yml'
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Run changed-files with the commit of the last successful test workflow run on main
|
- name: Run changed-files with the commit of the last successful test workflow run on main
|
||||||
id: changed-files-base-sha-pull-request
|
id: changed-files-base-sha-pull-request
|
||||||
uses: tj-actions/changed-files@v34
|
uses: tj-actions/changed-files@v34
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.commit_hash }}
|
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue