Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
489e2d514f | ||
|
|
d889202b3a | ||
|
|
9ec430d951 | ||
|
|
ca2815e08c | ||
|
|
120ceacaf7 | ||
|
|
d205273c8b | ||
|
|
cc55e77a98 | ||
|
|
64fdc4478a | ||
|
|
669bce6c25 | ||
|
|
8d5a33c603 | ||
|
|
00d83b13d6 | ||
|
|
223d074d69 | ||
|
|
d31b4186e9 | ||
|
|
223ef07a3f | ||
|
|
5eeb83fa4e | ||
|
|
83e0ed24b0 | ||
|
|
737590d30e | ||
|
|
4c551d94e0 | ||
|
|
506d6c005e | ||
|
|
fa5d79bbb3 | ||
|
|
c9e3c674ba |
10
.github/ISSUE_TEMPLATE.md
vendored
10
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,10 +0,0 @@
|
||||
* changed-files:
|
||||
|
||||
### Description
|
||||
|
||||
Describe what you were trying to get done.
|
||||
Tell us what happened, what went wrong, and what you expected to happen.
|
||||
|
||||
### What I Did
|
||||
|
||||
Add some details about your workflow ?
|
||||
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
32
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[BUG]"
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
2
.github/workflows/sync-release-version.yml
vendored
2
.github/workflows/sync-release-version.yml
vendored
@@ -9,6 +9,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Sync release version.
|
||||
uses: tj-actions/sync-release-version@v8
|
||||
id: sync-release-version
|
||||
|
||||
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@@ -1,9 +1,6 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
@@ -16,15 +13,12 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Run changed-files with defaults
|
||||
if: github.event_name == 'pull_request'
|
||||
id: changed-files
|
||||
uses: ./
|
||||
- name: Show output
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
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
|
||||
@@ -34,12 +28,10 @@ jobs:
|
||||
run: |
|
||||
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
|
||||
uses: ./
|
||||
with:
|
||||
separator: ","
|
||||
- name: Show output
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-comma.outputs) }}"
|
||||
|
||||
59
HISTORY.md
Normal file
59
HISTORY.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# Changelog
|
||||
|
||||
## [v3.2](https://github.com/tj-actions/changed-files/tree/v3.2) (2021-04-11)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.1...v3.2)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Add support for all modified files [\#16](https://github.com/tj-actions/changed-files/pull/16) ([jackton1](https://github.com/jackton1))
|
||||
- Update test.yml [\#14](https://github.com/tj-actions/changed-files/pull/14) ([jackton1](https://github.com/jackton1))
|
||||
- Upgraded to v3.1 [\#13](https://github.com/tj-actions/changed-files/pull/13) ([jackton1](https://github.com/jackton1))
|
||||
|
||||
## [v3.1](https://github.com/tj-actions/changed-files/tree/v3.1) (2021-04-04)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3...v3.1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Upgraded to v3 [\#12](https://github.com/tj-actions/changed-files/pull/12) ([jackton1](https://github.com/jackton1))
|
||||
|
||||
## [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)*
|
||||
51
README.md
51
README.md
@@ -1,4 +1,4 @@
|
||||
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml) [](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml)
|
||||
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml) [](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml) <a href="https://github.com/search?q=tj-actions+changed-files+path%3A.github%2Fworkflows+language%3AYAML&type=code" target="_blank" title="Public workflows that use this action."><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fapi-git-master.endbug.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fchanged-files%26badge%3Dtrue" alt="Public workflows that use this action."></a>
|
||||
|
||||
changed-files
|
||||
-------------
|
||||
@@ -14,17 +14,41 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
|
||||
|
||||
## Usage
|
||||
|
||||
With defaults
|
||||
|
||||
```yaml
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test changed-files
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v3.2
|
||||
```
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
...
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Get changed files using defaults
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v3
|
||||
uses: tj-actions/changed-files@v3.2
|
||||
|
||||
- name: Get changed files using a comma separator
|
||||
id: changed-files-comma
|
||||
uses: tj-actions/changed-files@v3
|
||||
uses: tj-actions/changed-files@v3.2
|
||||
with:
|
||||
separator: ","
|
||||
|
||||
@@ -47,6 +71,26 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
|
||||
|
||||
```
|
||||
|
||||
### Running [pre-commit](https://pre-commit.com/) on all modified files
|
||||
|
||||
```yaml
|
||||
...
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v3.2
|
||||
|
||||
- name: Pre-commit
|
||||
uses: pre-commit/action@v2.0.0
|
||||
with:
|
||||
extra_args: -v --hook-stage push --files ${{ steps.changed-files.outputs.all_modified_files }}
|
||||
token: ${{ secrets.github_token }}
|
||||
```
|
||||
|
||||
|
||||
## Inputs
|
||||
|
||||
@@ -71,6 +115,7 @@ Using the default separator.
|
||||
| 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 (*) <br /> *i.e a combination of all options above.* |
|
||||
| all_modified_files | `string` | 'new.txt other.png ...' | Select all modified files <br /> *i.e a combination of all added, <br />copied and modified files (ACM).* |
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
@@ -35,6 +35,9 @@ outputs:
|
||||
all_changed_files:
|
||||
description: List of all changed files.
|
||||
value: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
all_modified_files:
|
||||
description: List of all copied modified and added files
|
||||
value: ${{ steps.changed-files.outputs.all_modified_files }}
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
@@ -47,7 +50,6 @@ runs:
|
||||
fi
|
||||
|
||||
TARGET_BRANCH=${GITHUB_BASE_REF}
|
||||
CURRENT_BRANCH=${GITHUB_HEAD_REF}
|
||||
|
||||
git fetch --depth=1 origin ${TARGET_BRANCH}:${TARGET_BRANCH}
|
||||
|
||||
@@ -64,6 +66,7 @@ runs:
|
||||
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 }})$//')
|
||||
ALL_CHANGED=$(git diff --diff-filter='*ACDMRTUX' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
||||
ALL_MODIFIED_FILES=$(git diff --diff-filter='ACM' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
|
||||
|
||||
echo "Getting diff..."
|
||||
echo "::set-output name=added_files::$ADDED"
|
||||
@@ -75,6 +78,7 @@ runs:
|
||||
echo "::set-output name=unmerged_files::$UNMERGED"
|
||||
echo "::set-output name=unknown_files::$UNKNOWN"
|
||||
echo "::set-output name=all_changed_files::$ALL_CHANGED"
|
||||
echo "::set-output name=all_modified_files::$ALL_MODIFIED_FILES"
|
||||
shell: bash
|
||||
|
||||
branding:
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"enabled": true,
|
||||
"prHourlyLimit": 10,
|
||||
"prConcurrentLimit": 5,
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"addLabels": [
|
||||
"dependencies"
|
||||
],
|
||||
"assignees": [
|
||||
"jackton1"
|
||||
],
|
||||
"assignAutomerge": true,
|
||||
"dependencyDashboard": true,
|
||||
"dependencyDashboardAutoclose": true,
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
"automerge": true
|
||||
},
|
||||
"packageRules": [
|
||||
{
|
||||
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
|
||||
"automerge": true,
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"addLabels": [
|
||||
"automerge"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "docker images",
|
||||
"matchLanguages": [
|
||||
"docker"
|
||||
],
|
||||
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"addLabels": [
|
||||
"automerge"
|
||||
],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user