Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbfaba544e | ||
|
|
417b634812 | ||
|
|
69ce8f5302 | ||
|
|
abf3dc48a6 | ||
|
|
36864ca8c6 | ||
|
|
689cd8a7ea | ||
|
|
715ae3d38e | ||
|
|
a85fa79b00 | ||
|
|
bdade9e883 | ||
|
|
e18ccae8fe | ||
|
|
ffb6aef8bf | ||
|
|
fd4add0d40 | ||
|
|
049242589c | ||
|
|
33a185bbac | ||
|
|
122b223c04 | ||
|
|
78d6add10d | ||
|
|
ca86f77326 | ||
|
|
56c6262bb9 | ||
|
|
1c5a3415f3 | ||
|
|
48835883f9 | ||
|
|
8673629857 | ||
|
|
a4321716fa | ||
|
|
c29faf8e4f | ||
|
|
c2eb99504f | ||
|
|
21c1f27d33 | ||
|
|
6c66f86688 | ||
|
|
3a11f58d0f | ||
|
|
fc280adde0 | ||
|
|
66a53ea26f | ||
|
|
6868b512ca | ||
|
|
d3c7a0c249 | ||
|
|
3a74bab53c | ||
|
|
f41f9eb54b | ||
|
|
ea54bfb72a | ||
|
|
68680cd505 | ||
|
|
a66004fa3e | ||
|
|
869aee8642 | ||
|
|
cd917a1be7 | ||
|
|
f003c2bfa4 | ||
|
|
40de2adecb | ||
|
|
69750fb30a | ||
|
|
78af41436f | ||
|
|
12a63a5a84 | ||
|
|
d3cc0d7b88 | ||
|
|
3a416d7bb8 | ||
|
|
8a0c8897e3 | ||
|
|
09028ea846 | ||
|
|
2d4ff74f14 | ||
|
|
e1d275d6d3 | ||
|
|
d048f47c2d | ||
|
|
3e1a5a0bbb | ||
|
|
c9d7fbfa0b | ||
|
|
b3f247794c | ||
|
|
9977eb95fd | ||
|
|
b2955a59c4 |
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: jackton1
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: tj-actions
|
||||||
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
otechie: # Replace with a single Otechie username
|
||||||
|
custom: []
|
||||||
19
.github/workflows/auto-approve.yml
vendored
Normal file
19
.github/workflows/auto-approve.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: Auto approve
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto-approve:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: hmarr/auto-approve-action@v2
|
||||||
|
if: |
|
||||||
|
github.actor == 'dependabot[bot]' ||
|
||||||
|
github.actor == 'dependabot' ||
|
||||||
|
github.actor == 'dependabot-preview[bot]' ||
|
||||||
|
github.actor == 'dependabot-preview' ||
|
||||||
|
github.actor == 'renovate[bot]' ||
|
||||||
|
github.actor == 'renovate'
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.PAT_TOKEN }}
|
||||||
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Sync release version
|
- name: Sync release version.
|
||||||
uses: tj-actions/sync-release-version@v8
|
uses: tj-actions/sync-release-version@v8
|
||||||
id: sync-release-version
|
id: sync-release-version
|
||||||
with:
|
with:
|
||||||
pattern: 'tj-actions/changed-files@'
|
pattern: '${{ github.repository }}@'
|
||||||
paths: |
|
paths: |
|
||||||
README.md
|
README.md
|
||||||
- name: Generate CHANGELOG
|
- name: Generate CHANGELOG
|
||||||
uses: tj-actions/github-changelog-generator@v1.3
|
uses: tj-actions/github-changelog-generator@v1.3
|
||||||
|
with:
|
||||||
|
output: 'HISTORY.md'
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
@@ -16,16 +16,30 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Run changed-files with defaults
|
- name: Run changed-files with defaults
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: ./
|
uses: ./
|
||||||
- name: Show output
|
- name: Show output
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
echo "${{ toJSON(steps.changed-files.outputs) }}"
|
echo "${{ toJSON(steps.changed-files.outputs) }}"
|
||||||
|
- name: List all modified files
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
run: |
|
||||||
|
for file in "${{ steps.changed-files.outputs.modified_files }}"; do
|
||||||
|
echo $file
|
||||||
|
done
|
||||||
|
- 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 }}."
|
||||||
- name: Run changed-files with comma separator
|
- name: Run changed-files with comma separator
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
id: changed-files-comma
|
id: changed-files-comma
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
- name: Show output
|
- name: Show output
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
echo "${{ toJSON(steps.changed-files-comma.outputs) }}"
|
echo "${{ toJSON(steps.changed-files-comma.outputs) }}"
|
||||||
|
|||||||
41
CHANGELOG.md
Normal file
41
CHANGELOG.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# 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)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Upgraded to v2 [\#5](https://github.com/tj-actions/changed-files/pull/5) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v2](https://github.com/tj-actions/changed-files/tree/v2) (2021-03-14)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1...v2)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Fixed end of string with separator [\#4](https://github.com/tj-actions/changed-files/pull/4) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v1](https://github.com/tj-actions/changed-files/tree/v1) (2021-03-05)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/7eba13b12c69e63845b6d8bf1d3453edb0549ff9...v1)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Update action.yml [\#2](https://github.com/tj-actions/changed-files/pull/2) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
History
|
|
||||||
-------
|
|
||||||
|
|
||||||
|
|
||||||
v1 (2021-03-04)
|
|
||||||
------------------
|
|
||||||
|
|
||||||
* Initial Release.
|
|
||||||
|
|
||||||
33
README.md
33
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.
|
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
|
## Usage
|
||||||
|
|
||||||
@@ -12,13 +18,13 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
|
|||||||
...
|
...
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Get modified files with defaults
|
- name: Get changed files using defaults
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: ./
|
uses: tj-actions/changed-files@v3
|
||||||
|
|
||||||
- name: Get modified files with comma separator
|
- name: Get changed files using a comma separator
|
||||||
id: changed-files-comma
|
id: changed-files-comma
|
||||||
uses: ./
|
uses: tj-actions/changed-files@v3
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
|
|
||||||
@@ -28,6 +34,17 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
|
|||||||
echo $file
|
echo $file
|
||||||
done
|
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')
|
||||||
|
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')
|
||||||
|
run: |
|
||||||
|
echo "Your test.txt has been deleted."
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@@ -53,7 +70,12 @@ Using the default separator.
|
|||||||
| changed_files | `string` | 'new.txt other.png ...' | Select only files that have their type changed (T) |
|
| 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) |
|
| 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) |
|
| 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
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -73,7 +95,6 @@ Features
|
|||||||
- All Changed Files
|
- All Changed Files
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: Get modified files
|
name: Changed files
|
||||||
description: Get modified files
|
description: Get all changed files
|
||||||
author: tj-actions
|
author: tj-actions
|
||||||
inputs:
|
inputs:
|
||||||
separator:
|
separator:
|
||||||
@@ -63,7 +63,7 @@ runs:
|
|||||||
CHANGED=$(git diff --diff-filter=T --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
CHANGED=$(git diff --diff-filter=T --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
UNMERGED=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
UNMERGED=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
UNKNOWN=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
UNKNOWN=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
ALL_CHANGED=$(git diff --diff-filter='*' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
ALL_CHANGED=$(git diff --diff-filter='*ACDMRTUX' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
|
|
||||||
echo "Getting diff..."
|
echo "Getting diff..."
|
||||||
echo "::set-output name=added_files::$ADDED"
|
echo "::set-output name=added_files::$ADDED"
|
||||||
|
|||||||
5
renovate.json
Normal file
5
renovate.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"extends": [
|
||||||
|
"config:base"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user