Skip to content

Commit

Permalink
feat(action): add delete mode (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: kty1965 <[email protected]>
  • Loading branch information
kty1965 and kty1965 authored Feb 16, 2024
1 parent 1df2a07 commit 7e60029
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46852,6 +46852,10 @@ async function run() {
expectCidrEntries.push(...cidrEntries);
}

if (mode === 'delete') {
expectCidrEntries.splice(0);
}

core.info(`number of existScopedIpAllowListEntries: ${existScopedIpAllowListEntries.length}`);
core.info(`number of expectCidrEntries: ${expectCidrEntries.length}`);

Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ async function run() {
expectCidrEntries.push(...cidrEntries);
}

if (mode === 'delete') {
expectCidrEntries.splice(0);
}

core.info(`number of existScopedIpAllowListEntries: ${existScopedIpAllowListEntries.length}`);
core.info(`number of expectCidrEntries: ${expectCidrEntries.length}`);

Expand Down

0 comments on commit 7e60029

Please sign in to comment.