Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7852058eee | ||
|
|
a5b0000bd1 | ||
|
|
b49c7a478a | ||
|
|
d7ab28fff8 | ||
|
|
ee67c3ebe9 | ||
|
|
1046f8a4de | ||
|
|
b6e5d26963 | ||
|
|
5f050e0b7a | ||
|
|
5b2a45c658 | ||
|
|
ca62688ed8 | ||
|
|
a6145b548a | ||
|
|
88db9d9fcc | ||
|
|
8239cbf938 |
2
.github/workflows/sync-release-version.yml
vendored
2
.github/workflows/sync-release-version.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
paths: |
|
paths: |
|
||||||
README.md
|
README.md
|
||||||
- name: Generate CHANGELOG
|
- name: Generate CHANGELOG
|
||||||
uses: tj-actions/github-changelog-generator@v1.6
|
uses: tj-actions/github-changelog-generator@v1.8
|
||||||
with:
|
with:
|
||||||
output: 'HISTORY.md'
|
output: 'HISTORY.md'
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v5.1](https://github.com/tj-actions/changed-files/tree/v5.1) (2021-05-01)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v5...v5.1)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Strip leading whitespaces [\#50](https://github.com/tj-actions/changed-files/pull/50) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v5 [\#49](https://github.com/tj-actions/changed-files/pull/49) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v5](https://github.com/tj-actions/changed-files/tree/v5) (2021-05-01)
|
## [v5](https://github.com/tj-actions/changed-files/tree/v5) (2021-05-01)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.4...v5)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.4...v5)
|
||||||
|
|||||||
100
README.md
100
README.md
@@ -3,57 +3,17 @@
|
|||||||
changed-files
|
changed-files
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Get all modified files relative to the default branch (`pull_request*` events) or last commit (`push` events).
|
Get all modified files relative to the default branch (`pull_request*` events) or last commit (`push` event).
|
||||||
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- List all files that have changed
|
- List all files that have changed
|
||||||
- Between the current pull request branch and the default branch
|
- Between the current pull request branch and the default branch
|
||||||
- Between the last commit and the current pushed change.
|
- Between the last commit and the current pushed change.
|
||||||
- List only a subset of files that can be used to detect changes.
|
- Restrict change detection to a subset of files.
|
||||||
- Report on a subset of files that have all change.
|
- Report on files that have all changed.
|
||||||
- Report on a subset of files that have at least one file change.
|
- Report on files that have at least one file change.
|
||||||
- Regex pattern matching on a subset of files.
|
- Regex pattern matching on a subset of files.
|
||||||
|
|
||||||
|
|
||||||
## Outputs
|
|
||||||
|
|
||||||
Using the default separator.
|
|
||||||
|
|
||||||
| Acronym | Meaning |
|
|
||||||
|:---------:|:------------:|
|
|
||||||
| A | Added |
|
|
||||||
| C | Copied |
|
|
||||||
| M | Modified. |
|
|
||||||
| D | Deleted |
|
|
||||||
| R | Renamed |
|
|
||||||
| T | Type changed |
|
|
||||||
| U | Unmerged |
|
|
||||||
| X | Unknown |
|
|
||||||
|
|
||||||
|
|
||||||
| Output | type | example | description |
|
|
||||||
|:-------------------:|:------------:|:------------------------------:|:----------------------------------------:|
|
|
||||||
| 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).* |
|
|
||||||
| all_changed | `string` | `true OR false` | Returns `true` only when the filenames provided using `files` input have all changed |
|
|
||||||
| any_changed | `string` | `true OR false` | Returns `true` when any of the filenames provided using `files` input have changed |
|
|
||||||
| all_changed_files | `string` | 'new.txt other.png ...' | Select all paths (*) <br /> *i.e a combination of all options below.* |
|
|
||||||
| added_files | `string` | 'new.txt other.png ...' | Select only files that are Added (A) |
|
|
||||||
| copied_files | `string` | 'new.txt other.png ...' | Select only files that are Copied (C) |
|
|
||||||
| deleted_files | `string` | 'new.txt other.png ...' | Select only files that are Deleted (D) |
|
|
||||||
| modified_files | `string` | 'new.txt other.png ...' | Select only files that are Modified (M) |
|
|
||||||
| renamed_files | `string` | 'new.txt other.png ...' | Select only files that are Renamed (R) |
|
|
||||||
| changed_files | `string` | 'new.txt other.png ...' | Select only files that have their file 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) |
|
|
||||||
|
|
||||||
|
|
||||||
## Inputs
|
|
||||||
|
|
||||||
| Input | type | required | default | description |
|
|
||||||
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
|
|
||||||
| separator | `string` | `true` | `' '` | Separator to return outputs |
|
|
||||||
| files | `string OR string[]` | `false` | | Restricted list of specific files to watch for changes |
|
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -75,7 +35,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Test changed-files
|
name: Test changed-files
|
||||||
steps:
|
steps:
|
||||||
@@ -85,7 +45,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v5
|
uses: tj-actions/changed-files@v5.1
|
||||||
|
|
||||||
- name: List all modified files
|
- name: List all modified files
|
||||||
run: |
|
run: |
|
||||||
@@ -95,6 +55,44 @@ jobs:
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Outputs
|
||||||
|
|
||||||
|
| Acronym | Meaning |
|
||||||
|
|:---------:|:------------:|
|
||||||
|
| A | Added |
|
||||||
|
| C | Copied |
|
||||||
|
| M | Modified. |
|
||||||
|
| D | Deleted |
|
||||||
|
| R | Renamed |
|
||||||
|
| T | Type changed |
|
||||||
|
| U | Unmerged |
|
||||||
|
| X | Unknown |
|
||||||
|
|
||||||
|
|
||||||
|
| Output | type | example | description |
|
||||||
|
|:-------------------:|:------------:|:------------------------------:|:----------------------------------------:|
|
||||||
|
| all_changed | `string` | `true` OR `false` | Returns `true` only when the filenames provided using `files` input have all changed |
|
||||||
|
| any_changed | `string` | `true` OR `false` | Returns `true` when any of the filenames provided using `files` input have changed |
|
||||||
|
| 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).* |
|
||||||
|
| all_changed_files | `string` | `'new.txt other.png ...'` | Select all paths (*) <br /> *i.e a combination of all options below.* |
|
||||||
|
| added_files | `string` | `'new.txt other.png ...'` | Select only files that are Added (A) |
|
||||||
|
| copied_files | `string` | `'new.txt other.png ...'` | Select only files that are Copied (C) |
|
||||||
|
| deleted_files | `string` | `'new.txt other.png ...'` | Select only files that are Deleted (D) |
|
||||||
|
| modified_files | `string` | `'new.txt other.png ...'` | Select only files that are Modified (M) |
|
||||||
|
| renamed_files | `string` | `'new.txt other.png ...'` | Select only files that are Renamed (R) |
|
||||||
|
| changed_files | `string` | `'new.txt other.png ...'` | Select only files that have their file 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) |
|
||||||
|
|
||||||
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
|
| Input | type | required | default | description |
|
||||||
|
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
|
||||||
|
| separator | `string` | `true` | `' '` | Output string separator |
|
||||||
|
| files | `string OR string[]` | `false` | | Restricted list of specific files to watch for changes |
|
||||||
|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -103,11 +101,11 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Get changed files using defaults
|
- name: Get changed files using defaults
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v5
|
uses: tj-actions/changed-files@v5.1
|
||||||
|
|
||||||
- name: Get changed files using a comma separator
|
- name: Get changed files using a comma separator
|
||||||
id: changed-files-comma
|
id: changed-files-comma
|
||||||
uses: tj-actions/changed-files@v5
|
uses: tj-actions/changed-files@v5.1
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
|
|
||||||
@@ -129,7 +127,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get specific changed files
|
- name: Get specific changed files
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v5
|
uses: tj-actions/changed-files@v5.1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -163,7 +161,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v5
|
uses: tj-actions/changed-files@v5.1
|
||||||
|
|
||||||
- name: Pre-commit
|
- name: Pre-commit
|
||||||
uses: pre-commit/action@v2.0.0
|
uses: pre-commit/action@v2.0.0
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ name: Changed files
|
|||||||
description: Get all changed files
|
description: Get all changed files
|
||||||
author: tj-actions
|
author: tj-actions
|
||||||
inputs:
|
inputs:
|
||||||
|
token:
|
||||||
|
description: 'Github token'
|
||||||
|
required: true
|
||||||
|
default: ${{ github.token }}
|
||||||
separator:
|
separator:
|
||||||
description: 'Split character for array output'
|
description: 'Split character for array output'
|
||||||
required: true
|
required: true
|
||||||
@@ -55,6 +59,8 @@ runs:
|
|||||||
- id: changed_files
|
- id: changed_files
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
git remote set-url origin "https://${{ inputs.token }}@github.com/${{ github.repository }}"
|
||||||
|
|
||||||
export INPUT_FILES="${{ inputs.files }}"
|
export INPUT_FILES="${{ inputs.files }}"
|
||||||
export INPUT_SEPARATOR="${{ inputs.separator }}"
|
export INPUT_SEPARATOR="${{ inputs.separator }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user