mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-16 19:27:39 +00:00
fix: bug with only_(changed|modified|deleted) outputs (#1238)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
a522bdb715
commit
6dc4095801
3 changed files with 10 additions and 3 deletions
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
13
src/main.ts
13
src/main.ts
|
@ -271,7 +271,9 @@ export async function run(): Promise<void> {
|
|||
)
|
||||
|
||||
const onlyChanged =
|
||||
otherChangedFiles.length === 0 && allChangedFiles.length > 0
|
||||
otherChangedFiles.length === 0 &&
|
||||
allChangedFiles.length > 0 &&
|
||||
filePatterns.length > 0
|
||||
|
||||
await setOutput({
|
||||
key: 'only_changed',
|
||||
|
@ -323,7 +325,9 @@ export async function run(): Promise<void> {
|
|||
)
|
||||
|
||||
const onlyModified =
|
||||
otherModifiedFiles.length === 0 && allModifiedFiles.length > 0
|
||||
otherModifiedFiles.length === 0 &&
|
||||
allModifiedFiles.length > 0 &&
|
||||
filePatterns.length > 0
|
||||
|
||||
await setOutput({
|
||||
key: 'only_modified',
|
||||
|
@ -374,7 +378,10 @@ export async function run(): Promise<void> {
|
|||
filePath => !deletedFiles.split(inputs.separator).includes(filePath)
|
||||
)
|
||||
|
||||
const onlyDeleted = otherDeletedFiles.length === 0 && deletedFiles.length > 0
|
||||
const onlyDeleted =
|
||||
otherDeletedFiles.length === 0 &&
|
||||
deletedFiles.length > 0 &&
|
||||
filePatterns.length > 0
|
||||
|
||||
await setOutput({
|
||||
key: 'only_deleted',
|
||||
|
|
Loading…
Reference in a new issue