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
12
dist/index.js
generated
vendored
12
dist/index.js
generated
vendored
@ -991,7 +991,9 @@ function run() {
|
|||||||
const otherChangedFiles = allOtherChangedFiles
|
const otherChangedFiles = allOtherChangedFiles
|
||||||
.split(inputs.separator)
|
.split(inputs.separator)
|
||||||
.filter(filePath => !allChangedFiles.split(inputs.separator).includes(filePath));
|
.filter(filePath => !allChangedFiles.split(inputs.separator).includes(filePath));
|
||||||
const onlyChanged = otherChangedFiles.length === 0 && allChangedFiles.length > 0;
|
const onlyChanged = otherChangedFiles.length === 0 &&
|
||||||
|
allChangedFiles.length > 0 &&
|
||||||
|
filePatterns.length > 0;
|
||||||
yield (0, utils_1.setOutput)({
|
yield (0, utils_1.setOutput)({
|
||||||
key: 'only_changed',
|
key: 'only_changed',
|
||||||
value: onlyChanged,
|
value: onlyChanged,
|
||||||
@ -1033,7 +1035,9 @@ function run() {
|
|||||||
const otherModifiedFiles = allOtherModifiedFiles
|
const otherModifiedFiles = allOtherModifiedFiles
|
||||||
.split(inputs.separator)
|
.split(inputs.separator)
|
||||||
.filter(filePath => !allModifiedFiles.split(inputs.separator).includes(filePath));
|
.filter(filePath => !allModifiedFiles.split(inputs.separator).includes(filePath));
|
||||||
const onlyModified = otherModifiedFiles.length === 0 && allModifiedFiles.length > 0;
|
const onlyModified = otherModifiedFiles.length === 0 &&
|
||||||
|
allModifiedFiles.length > 0 &&
|
||||||
|
filePatterns.length > 0;
|
||||||
yield (0, utils_1.setOutput)({
|
yield (0, utils_1.setOutput)({
|
||||||
key: 'only_modified',
|
key: 'only_modified',
|
||||||
value: onlyModified,
|
value: onlyModified,
|
||||||
@ -1075,7 +1079,9 @@ function run() {
|
|||||||
const otherDeletedFiles = allOtherDeletedFiles
|
const otherDeletedFiles = allOtherDeletedFiles
|
||||||
.split(inputs.separator)
|
.split(inputs.separator)
|
||||||
.filter(filePath => !deletedFiles.split(inputs.separator).includes(filePath));
|
.filter(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;
|
||||||
yield (0, utils_1.setOutput)({
|
yield (0, utils_1.setOutput)({
|
||||||
key: 'only_deleted',
|
key: 'only_deleted',
|
||||||
value: onlyDeleted,
|
value: onlyDeleted,
|
||||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
13
src/main.ts
13
src/main.ts
@ -271,7 +271,9 @@ export async function run(): Promise<void> {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const onlyChanged =
|
const onlyChanged =
|
||||||
otherChangedFiles.length === 0 && allChangedFiles.length > 0
|
otherChangedFiles.length === 0 &&
|
||||||
|
allChangedFiles.length > 0 &&
|
||||||
|
filePatterns.length > 0
|
||||||
|
|
||||||
await setOutput({
|
await setOutput({
|
||||||
key: 'only_changed',
|
key: 'only_changed',
|
||||||
@ -323,7 +325,9 @@ export async function run(): Promise<void> {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const onlyModified =
|
const onlyModified =
|
||||||
otherModifiedFiles.length === 0 && allModifiedFiles.length > 0
|
otherModifiedFiles.length === 0 &&
|
||||||
|
allModifiedFiles.length > 0 &&
|
||||||
|
filePatterns.length > 0
|
||||||
|
|
||||||
await setOutput({
|
await setOutput({
|
||||||
key: 'only_modified',
|
key: 'only_modified',
|
||||||
@ -374,7 +378,10 @@ export async function run(): Promise<void> {
|
|||||||
filePath => !deletedFiles.split(inputs.separator).includes(filePath)
|
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({
|
await setOutput({
|
||||||
key: 'only_deleted',
|
key: 'only_deleted',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user