Compare commits

...

13 Commits
v5.1 ... v5.2

Author SHA1 Message Date
Tonye Jack
7852058eee Fixed bug reading username
```
fatal: could not read Username for 'github.com': No such device or address
```
2021-05-06 08:44:56 -04:00
Tonye Jack
a5b0000bd1 Update README.md 2021-05-05 03:43:47 -04:00
Tonye Jack
b49c7a478a Update README.md 2021-05-05 03:42:51 -04:00
renovate[bot]
d7ab28fff8 Update tj-actions/github-changelog-generator action to v1.8 (#52)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-04 15:45:11 -04:00
Tonye Jack
ee67c3ebe9 Update README.md 2021-05-04 14:08:52 -04:00
Tonye Jack
1046f8a4de Update README.md 2021-05-04 14:07:18 -04:00
Tonye Jack
b6e5d26963 Update README.md 2021-05-04 13:54:08 -04:00
Tonye Jack
5f050e0b7a Update README.md 2021-05-04 13:53:26 -04:00
Tonye Jack
5b2a45c658 Update README.md 2021-05-03 13:29:37 -04:00
Tonye Jack
ca62688ed8 Update README.md 2021-05-02 07:53:27 -04:00
Tonye Jack
a6145b548a Update README.md 2021-05-01 20:16:27 -04:00
Tonye Jack
88db9d9fcc Update README.md 2021-05-01 20:15:41 -04:00
Tonye Jack
8239cbf938 Upgraded to v5.1 (#51)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-05-01 20:14:02 -04:00
4 changed files with 65 additions and 52 deletions

View File

@@ -19,7 +19,7 @@ jobs:
paths: |
README.md
- name: Generate CHANGELOG
uses: tj-actions/github-changelog-generator@v1.6
uses: tj-actions/github-changelog-generator@v1.8
with:
output: 'HISTORY.md'
- name: Create Pull Request

View File

@@ -1,5 +1,14 @@
# 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)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.4...v5)

100
README.md
View File

@@ -3,57 +3,17 @@
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
- List all files that have changed
- Between the current pull request branch and the default branch
- Between the last commit and the current pushed change.
- List only a subset of files that can be used to detect changes.
- Report on a subset of files that have all change.
- Report on a subset of files that have at least one file change.
- 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 |
- Restrict change detection to a subset of files.
- Report on files that have all changed.
- Report on files that have at least one file change.
- Regex pattern matching on a subset of files.
## Usage
@@ -75,7 +35,7 @@ on:
- main
jobs:
test:
build:
runs-on: ubuntu-latest
name: Test changed-files
steps:
@@ -85,7 +45,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v5
uses: tj-actions/changed-files@v5.1
- name: List all modified files
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
```yaml
@@ -103,11 +101,11 @@ jobs:
- uses: actions/checkout@v2
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v5
uses: tj-actions/changed-files@v5.1
- name: Get changed files using a comma separator
id: changed-files-comma
uses: tj-actions/changed-files@v5
uses: tj-actions/changed-files@v5.1
with:
separator: ","
@@ -129,7 +127,7 @@ jobs:
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v5
uses: tj-actions/changed-files@v5.1
with:
files: |
my-file.txt
@@ -163,7 +161,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v5
uses: tj-actions/changed-files@v5.1
- name: Pre-commit
uses: pre-commit/action@v2.0.0

View File

@@ -2,6 +2,10 @@ name: Changed files
description: Get all changed files
author: tj-actions
inputs:
token:
description: 'Github token'
required: true
default: ${{ github.token }}
separator:
description: 'Split character for array output'
required: true
@@ -55,6 +59,8 @@ runs:
- id: changed_files
run: |
set -e
git remote set-url origin "https://${{ inputs.token }}@github.com/${{ github.repository }}"
export INPUT_FILES="${{ inputs.files }}"
export INPUT_SEPARATOR="${{ inputs.separator }}"