Skip to content

Commit

Permalink
fix issue with string as boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxymVlasov committed Feb 12, 2025
1 parent f8a4804 commit 709b4c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ function run() {
try {
const image = core.getInput('image');
const configFile = core.getInput('config-file');
const alwaysComment = Boolean(core.getInput('always-comment'));
// Convert always-comment input to boolean value.
// All values other than 'true' are considered false.
const alwaysComment = core.getInput('always-comment').toLowerCase() === 'true';
const diveRepo = core.getInput('dive-image-registry');
// Validate Docker image name format
if (!/^[\w.\-_/]+$/.test(diveRepo)) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ async function run(): Promise<void> {
try {
const image = core.getInput('image')
const configFile = core.getInput('config-file')
const alwaysComment = Boolean(core.getInput('always-comment'))
// Convert always-comment input to boolean value.
// All values other than 'true' are considered false.
const alwaysComment =
core.getInput('always-comment').toLowerCase() === 'true'

const diveRepo = core.getInput('dive-image-registry')
// Validate Docker image name format
Expand Down

0 comments on commit 709b4c6

Please sign in to comment.