Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,19 @@ runs:
sed -i 's/__dirname/import.meta.dirname/g' "${{ github.workspace }}/dist/plugin/index.js"
fi

- name: Finalize manifest configuration JSON
if: ${{ inputs.action == 'publish' && steps.resolve_refs.outputs.should_skip != 'true' }}
shell: bash
env:
MANIFEST_PATH: ${{ inputs.manifestPath }}
SKIP_BOT_EVENTS: ${{ inputs.skipBotEvents }}
EXCLUDE_SUPPORTED_EVENTS: ${{ inputs.excludeSupportedEvents }}
GITHUB_WORKSPACE: ${{ github.workspace }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_REF_NAME: ${{ steps.resolve_refs.outputs.source_ref }}
run: |
node ${{ github.action_path }}/.github/scripts/update-manifest.js
Comment on lines +195 to +206
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

echo "Checking where manifest env is wired today..."
rg -n -C2 'SKIP_BOT_EVENTS|EXCLUDE_SUPPORTED_EVENTS|GITHUB_ENV|name: Install dependencies|name: Build project|name: Finalize manifest configuration JSON' action.yml

Repository: ubiquity-os/action-deploy-plugin

Length of output: 2331


🏁 Script executed:

#!/bin/bash
# Get a cleaner view of the step structure around lines 140-210
cat -n action.yml | sed -n '140,210p'

Repository: ubiquity-os/action-deploy-plugin

Length of output: 4038


Export manifest flags early so install/build can access them.

These env vars are only passed to the manifest steps via step-level env: sections (lines 158–164 and 198–204), not exported to $GITHUB_ENV. Install dependencies and Build project cannot access SKIP_BOT_EVENTS or EXCLUDE_SUPPORTED_EVENTS, so any lifecycle scripts that depend on them will run with defaults. The Finalize step only patches the manifest after build completes.

Suggested approach
+    - name: Export manifest env
+      if: ${{ inputs.action == 'publish' && steps.resolve_refs.outputs.should_skip != 'true' }}
+      shell: bash
+      run: |
+        echo "SKIP_BOT_EVENTS=${{ inputs.skipBotEvents }}" >> "$GITHUB_ENV"
+        echo "EXCLUDE_SUPPORTED_EVENTS=${{ inputs.excludeSupportedEvents }}" >> "$GITHUB_ENV"
+
     - name: Install dependencies


- name: Get GitHub App token
if: env.APP_ID != '' && env.APP_PRIVATE_KEY != '' && steps.resolve_refs.outputs.should_skip != 'true'
uses: actions/create-github-app-token@v1
Expand All @@ -208,7 +221,7 @@ runs:
cd ${{ github.action_path }}
bun install

- name: Inject reassembly code into dist/index.js
- name: Inject reassembly entrypoints
if: ${{ inputs.action == 'publish' && steps.resolve_refs.outputs.should_skip != 'true' }}
shell: bash
env:
Expand All @@ -219,9 +232,15 @@ runs:
printf '{"type":"module"}\n' > dist/plugin/package.json
fi
cp "${{ github.action_path }}/.github/scripts/reassembly-esm.js" dist/index.js
printf '%s\n' \
'import("./index.js").catch((error) => {' \
' console.error("Failed to load dist/index.js from CJS bridge:", error);' \
' process.exit(1);' \
'});' > dist/index.cjs
cp dist/plugin/package.json dist/package.json
else
cp "${{ github.action_path }}/.github/scripts/reassembly-cjs.js" dist/index.js
cp "${{ github.action_path }}/.github/scripts/reassembly-cjs.js" dist/index.cjs
fi

- name: Publish manifest.json and dist to artifact branch
Expand Down