From 4a545bab20df8a49da71e08ea0f251c5f4ddb0d2 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Wed, 22 Jul 2026 21:59:44 +0100 Subject: [PATCH] Fix bugs and incorrect metadata found during pre-release review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit-data: - Fix output name mismatch: entrypoint wrote "tag_count" but action.yml declared "tags_count", so consumers got empty string action-io-generator: - Update Dockerfile from EOL node:16-alpine to node:24-alpine - Fix dead $? check in entrypoint.sh — set +x reset $? to 0 before the conditional, making the error branch unreachable - Update package.json URLs from personal fork (tetchel/action-io-generator) to redhat-actions/common bundle-verifier: - Fix bundle_file description: said "directory" but code reads it as a file via fs.readFile(); remove misleading default of "dist" - Fix main field: index.js -> dist/index.js - Add "private": true to prevent accidental npm publish Co-Authored-By: Claude Opus 4.6 --- action-io-generator/Dockerfile | 2 +- action-io-generator/entrypoint.sh | 4 ++-- action-io-generator/package.json | 7 ++++--- bundle-verifier/action.yml | 3 +-- bundle-verifier/package.json | 4 ++-- commit-data/entrypoint.sh | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/action-io-generator/Dockerfile b/action-io-generator/Dockerfile index 64ff36d..2ec4f74 100644 --- a/action-io-generator/Dockerfile +++ b/action-io-generator/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine +FROM node:24-alpine COPY ./entrypoint.sh /entrypoint.sh diff --git a/action-io-generator/entrypoint.sh b/action-io-generator/entrypoint.sh index d3c7b85..fb4f9d7 100755 --- a/action-io-generator/entrypoint.sh +++ b/action-io-generator/entrypoint.sh @@ -17,12 +17,12 @@ echo "Generating inputs and outputs enum in $file_name" set -x npx action-io-generator --outFile=$file_name -git --no-pager diff --no-index --exit-code $INPUT_IO_FILE $file_name set +x -if [[ $? -eq 0 ]]; then +if git --no-pager diff --no-index --exit-code $INPUT_IO_FILE $file_name; then echo "✅ Inputs and Outputs are configured correctly!" else echo "❌ Inputs and Outputs are not configured correctly!" + exit 1 fi diff --git a/action-io-generator/package.json b/action-io-generator/package.json index ce0840e..f456759 100644 --- a/action-io-generator/package.json +++ b/action-io-generator/package.json @@ -5,15 +5,16 @@ "main": "dist/index.js", "repository": { "type": "git", - "url": "git://github.com/tetchel/action-io-generator.git" + "url": "git+https://github.com/redhat-actions/common.git", + "directory": "action-io-generator" }, "bin": "bin.js", "author": "tetchell@redhat.com", "license": "MIT", "bugs": { - "url": "https://github.com/tetchel/action-io-generator/issues" + "url": "https://github.com/redhat-actions/common/issues" }, - "homepage": "https://github.com/tetchel/action-io-generator#readme", + "homepage": "https://github.com/redhat-actions/common/tree/main/action-io-generator#readme", "scripts": { "compile": "tsc -p .", "bundle": "npx webpack --mode=production && cp -v bin.js dist/", diff --git a/bundle-verifier/action.yml b/bundle-verifier/action.yml index e1d2599..a3aa8ba 100644 --- a/bundle-verifier/action.yml +++ b/bundle-verifier/action.yml @@ -5,9 +5,8 @@ inputs: description: "Command to generate your bundle. An npm/yarn script is recommended." required: true bundle_file: - description: 'Output directory where your bundle is located.' + description: 'Output file where your bundle is located (e.g. dist/index.js).' required: true - default: 'dist' working_directory: description: 'Working directory to use for relative path to bundle_file, and to run the bundle_command in.' required: false diff --git a/bundle-verifier/package.json b/bundle-verifier/package.json index b33677c..de2fc19 100644 --- a/bundle-verifier/package.json +++ b/bundle-verifier/package.json @@ -2,8 +2,8 @@ "name": "bundle-verifier", "version": "0.0.1", "description": "GitHub Action to verify the committed bundle is up-to-date with the source", - "main": "index.js", - "author": "", + "private": true, + "main": "dist/index.js", "license": "MIT", "scripts": { "compile": "tsc -p .", diff --git a/commit-data/entrypoint.sh b/commit-data/entrypoint.sh index 5989275..a5fba82 100755 --- a/commit-data/entrypoint.sh +++ b/commit-data/entrypoint.sh @@ -54,4 +54,4 @@ echo "pr_base=${pr_base}" >> "$GITHUB_OUTPUT" echo "short_sha=${short_sha}" >> "$GITHUB_OUTPUT" echo "tag=${tag}" >> "$GITHUB_OUTPUT" echo "tags=${tags}" >> "$GITHUB_OUTPUT" -echo "tag_count=${tags_count}" >> "$GITHUB_OUTPUT" +echo "tags_count=${tags_count}" >> "$GITHUB_OUTPUT"