Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbfaba544e | ||
|
|
417b634812 | ||
|
|
69ce8f5302 | ||
|
|
abf3dc48a6 | ||
|
|
36864ca8c6 | ||
|
|
689cd8a7ea | ||
|
|
715ae3d38e | ||
|
|
a85fa79b00 | ||
|
|
bdade9e883 |
6
.github/workflows/sync-release-version.yml
vendored
6
.github/workflows/sync-release-version.yml
vendored
@@ -9,15 +9,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Sync release version
|
||||
- name: Sync release version.
|
||||
uses: tj-actions/sync-release-version@v8
|
||||
id: sync-release-version
|
||||
with:
|
||||
pattern: 'tj-actions/changed-files@'
|
||||
pattern: '${{ github.repository }}@'
|
||||
paths: |
|
||||
README.md
|
||||
- name: Generate CHANGELOG
|
||||
uses: tj-actions/github-changelog-generator@v1.3
|
||||
with:
|
||||
output: 'HISTORY.md'
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
|
||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
- name: Run step when README.md changes
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'README.md')
|
||||
run: |
|
||||
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
|
||||
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
|
||||
- name: Run changed-files with comma separator
|
||||
if: github.event_name == 'pull_request'
|
||||
id: changed-files-comma
|
||||
|
||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## [v3](https://github.com/tj-actions/changed-files/tree/v3) (2021-04-02)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v2.1...v3)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Update action.yml [\#11](https://github.com/tj-actions/changed-files/pull/11) ([jackton1](https://github.com/jackton1))
|
||||
- Update README.md [\#10](https://github.com/tj-actions/changed-files/pull/10) ([jackton1](https://github.com/jackton1))
|
||||
- Configure Renovate [\#9](https://github.com/tj-actions/changed-files/pull/9) ([renovate[bot]](https://github.com/apps/renovate))
|
||||
- Update test.yml [\#8](https://github.com/tj-actions/changed-files/pull/8) ([jackton1](https://github.com/jackton1))
|
||||
- Upgraded to v2.1 [\#6](https://github.com/tj-actions/changed-files/pull/6) ([jackton1](https://github.com/jackton1))
|
||||
|
||||
## [v2.1](https://github.com/tj-actions/changed-files/tree/v2.1) (2021-03-18)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v2...v2.1)
|
||||
|
||||
16
README.md
16
README.md
@@ -5,6 +5,12 @@ changed-files
|
||||
|
||||
Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---diff-filterACDMRTUXB82308203) to locate all files that have been modified relative to the default branch.
|
||||
|
||||
> NOTE: :warning: This action should only run on the following events :warning:
|
||||
> * [pull_request](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request)
|
||||
> * [pull_request_review](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_review)
|
||||
> * [pull_request_review_comment](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_review_comment)
|
||||
> * [pull_request_target](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -14,11 +20,11 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get changed files using defaults
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v2.1
|
||||
uses: tj-actions/changed-files@v3
|
||||
|
||||
- name: Get changed files using a comma separator
|
||||
id: changed-files-comma
|
||||
uses: tj-actions/changed-files@v2.1
|
||||
uses: tj-actions/changed-files@v3
|
||||
with:
|
||||
separator: ","
|
||||
|
||||
@@ -29,12 +35,12 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
|
||||
done
|
||||
|
||||
- name: Run step when a file changes in a PR relative to the default branch
|
||||
if: contains(${{ steps.changed-files.outputs.modified_files }}, 'my-file.txt')
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
|
||||
run: |
|
||||
echo "Your file my-file.txt has been modified."
|
||||
|
||||
- name: Run step when a file is deleted in a PR relative to the default branch
|
||||
if: contains(${{ steps.changed-files.outputs.deleted_files }}, 'test.txt')
|
||||
if: contains(steps.changed-files.outputs.deleted_files, 'test.txt')
|
||||
run: |
|
||||
echo "Your test.txt has been deleted."
|
||||
|
||||
@@ -64,7 +70,7 @@ Using the default separator.
|
||||
| changed_files | `string` | 'new.txt other.png ...' | Select only files that have their type changed (T) |
|
||||
| unmerged_files | `string` | 'new.txt other.png ...' | Select only files that are Unmerged (U) |
|
||||
| unknown_files | `string` | 'new.txt other.png ...' | Select only files that are Unknown (X) |
|
||||
| all_changed_files | `string` | 'new.txt other.png ...' | Select all paths (*) are selected if there <br/> is any file that matches other <br/> criteria in the comparison; <br/> if there is no file that <br/> matches other criteria, <br/> nothing is selected. |
|
||||
| all_changed_files | `string` | 'new.txt other.png ...' | Select all paths (*) <br /> *i.e a combination of all options above.* |
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: Diff changed files
|
||||
description: Diff changed files
|
||||
name: Changed files
|
||||
description: Get all changed files
|
||||
author: tj-actions
|
||||
inputs:
|
||||
separator:
|
||||
|
||||
Reference in New Issue
Block a user