Skip to content

chore(ci): consolidate deploy workflows - #22

Merged
gentlementlegen merged 3 commits into
developmentfrom
chore/consolidate-deploy-workflows
Mar 17, 2026
Merged

gentlementlegen merged 3 commits into
developmentfrom
chore/consolidate-deploy-workflows

Conversation

@gentlementlegen

Copy link
Copy Markdown
Member

Summary

  • consolidate deployment into .github/workflows/update-configuration.yml (Action + optional Deno)
  • remove legacy standalone deploy workflows (deno-deploy.yml / worker-deploy.yml / worker-delete.yml when present)
  • keep plugin-specific manifest defaults

Defaults in this repo

  • deploy_deno_enabled: true
  • skip_bot_events: false
  • exclude_supported_events:

@coderabbitai

coderabbitai Bot commented Mar 12, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Three workflow files were removed: .github/workflows/deno-deploy.yml, .github/workflows/worker-delete.yml, and .github/workflows/worker-deploy.yml. The remaining .github/workflows/update-configuration.yml was renamed to "Deploy" and reworked: new workflow_dispatch inputs (build_action_enabled, deploy_deno_enabled, skip_bot_events, exclude_supported_events); source-ref resolution and logging steps; conditional publishing of action artifacts; environment selection logic; and an integrated Deno deployment flow gated by inputs and reference type.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is missing the required issue link. The template mandates "Resolves #<issue_number>" but the description omits this entirely. Add "Resolves #<issue_number>" at the top of the description to link the related issue as required by the template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title "chore(ci): consolidate deploy workflows" accurately summarizes the main change: consolidating multiple deployment workflows into one file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/consolidate-deploy-workflows
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9231573c-0207-40f3-8f05-a5f71027f144

📥 Commits

Reviewing files that changed from the base of the PR and between 1b408a4 and 40d24a1.

📒 Files selected for processing (4)
  • .github/workflows/deno-deploy.yml
  • .github/workflows/update-configuration.yml
  • .github/workflows/worker-delete.yml
  • .github/workflows/worker-deploy.yml
💤 Files with no reviewable changes (3)
  • .github/workflows/worker-delete.yml
  • .github/workflows/worker-deploy.yml
  • .github/workflows/deno-deploy.yml

deploy:
name: "Deploy (Action / Deno)"
runs-on: ubuntu-latest
permissions: write-all

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:

cat -n .github/workflows/update-configuration.yml

Repository: ubiquity-os/command-demo

Length of output: 7736


Pin actions to full SHAs and scope permissions.

Line 41's permissions: write-all grants unnecessary access to GITHUB_TOKEN. The unpinned cross-repo actions at lines 94, 128, and 134 reference @main while receiving sensitive secrets (APP_ID, APP_PRIVATE_KEY, KERNEL_PUBLIC_KEY, GITHUB_TOKEN, APP_INSTALLATION_ID). If an action is compromised, it can access these secrets and write to the repository. Pin actions to full commit SHAs and restrict permissions to only what each step requires.

Comment on lines +75 to +78
echo "source_ref=$source_ref" >> "$GITHUB_OUTPUT"
echo "is_tag_ref=$is_tag_ref" >> "$GITHUB_OUTPUT"
echo "is_artifact_ref=$is_artifact_ref" >> "$GITHUB_OUTPUT"
echo "ACTION_REF=${GITHUB_REPOSITORY}@${action_ref_branch}" >> "$GITHUB_ENV"

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:

# First, get the actual lines from the workflow file
fd '.github/workflows/update-configuration.yml' -x cat {} | head -160 | tail -90

Repository: ubiquity-os/command-demo

Length of output: 50


🏁 Script executed:

find . -name "update-configuration.yml" -type f

Repository: ubiquity-os/command-demo

Length of output: 112


🏁 Script executed:

cat -n ./.github/workflows/update-configuration.yml | sed -n '70,85p'

Repository: ubiquity-os/command-demo

Length of output: 828


🏁 Script executed:

cat -n ./.github/workflows/update-configuration.yml | sed -n '135,150p'

Repository: ubiquity-os/command-demo

Length of output: 1127


🌐 Web query:

GitHub Actions $GITHUB_ENV vs $GITHUB_OUTPUT env context expression resolution

💡 Result:

What gets resolved when (expressions vs runtime)

  • ${{ ... }} expressions are evaluated by the GitHub Actions workflow engine (before/during step dispatch), using contexts like github, env, steps, needs, etc.
  • $VAR / %VAR% / $env:VAR are expanded later by the runner shell at runtime inside run:.

$GITHUB_ENV (environment variables) vs env context

  • Writing NAME=value to $GITHUB_ENV sets an OS environment variable for subsequent steps in the same job; the step that writes it cannot see the new value. [1]
  • The env context (${{ env.NAME }}) contains variables defined in workflow/job/step env: blocks, and does not contain variables inherited by the runner process. So a variable created via $GITHUB_ENV is reliably usable as $NAME in later run: steps, but is not guaranteed to appear in ${{ env.NAME }}. [2]

$GITHUB_OUTPUT (step outputs) vs env context

  • Writing name=value to $GITHUB_OUTPUT sets a step output (step needs an id) that you can reference later as ${{ steps.<id>.outputs.<name> }}. [1]
  • Step outputs are specifically designed to feed expressions in later steps (including if:, with:, env: values, etc.), because they live in the steps context. [1][2]

Practical rule of thumb

  • Use $GITHUB_ENV when the next steps only need the value inside shell scripts (run:): echo "$MYVAR".
  • Use $GITHUB_OUTPUT when the next steps need the value in workflow expressions: if: ${{ steps.calc.outputs.foo == 'bar' }} or with: token: ${{ steps.auth.outputs.token }}. [1][2]

Minimal example showing the difference

- name: Compute
  id: calc
  run: |
    echo "RUNTIME_ONLY=hello" >> "$GITHUB_ENV"
    echo "expr_value=hello"   >> "$GITHUB_OUTPUT"

- name: Use in shell (works)
  run: echo "$RUNTIME_ONLY"

- name: Use in expressions (use outputs)
  if: ${{ steps.calc.outputs.expr_value == 'hello' }}
  run: echo "expression matched"

Sources: GitHub Docs on workflow commands (GITHUB_ENV, GITHUB_OUTPUT) [1], contexts and env/steps behavior [2], and notes about what the env context does/doesn’t include [3].

References

  • [1] GitHub Docs — Workflow commands for GitHub Actions (sections “Setting an environment variable”, “Setting an output parameter”) (docs.github.com)
  • [2] GitHub Docs — Contexts (env context does not include runner-inherited variables; steps.<id>.outputs) (docs.github.com)
  • [3] GitHub Docs — Variables reference (default env vars not accessible via env context; context alternatives) (docs.github.com)

Citations:


ACTION_REF must use step output, not $GITHUB_ENV.

Writing to $GITHUB_ENV makes values available only as shell variables in later steps. The env context (${{ env.* }}) contains only workflow/job/step env: block variables—not runner-inherited ones. Line 142's ACTION_REF: ${{ env.ACTION_REF }} will not resolve to the value written at line 78. Step outputs (via $GITHUB_OUTPUT and ${{ steps.refs.outputs.action_ref }}) are the correct way to pass values to workflow expressions.

Suggested fix
-          echo "ACTION_REF=${GITHUB_REPOSITORY}@${action_ref_branch}" >> "$GITHUB_ENV"
+          action_ref="${GITHUB_REPOSITORY}@${action_ref_branch}"
+          echo "action_ref=$action_ref" >> "$GITHUB_OUTPUT"
+          echo "ACTION_REF=$action_ref" >> "$GITHUB_ENV"
...
-          ACTION_REF: ${{ env.ACTION_REF }}
+          ACTION_REF: ${{ steps.refs.outputs.action_ref }}

Comment on lines +114 to +122
deno-version: v2.x

- name: Install dependencies
if: ${{ env.DEPLOY_DENO_ENABLED == 'true' && steps.refs.outputs.is_tag_ref != 'true' && steps.refs.outputs.is_artifact_ref != 'true' && github.event_name != 'delete' }}
run: deno install --node-modules-dir=auto --no-lock

- name: Generate manifest for deploy
if: ${{ env.DEPLOY_DENO_ENABLED == 'true' && steps.refs.outputs.is_tag_ref != 'true' && steps.refs.outputs.is_artifact_ref != 'true' && github.event_name != 'delete' }}
run: deno x -A -y --no-lock npm:@ubiquity-os/plugin-manifest-tool@latest

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:

# Check for deno configuration files
fd -t f "(deno\.json|deno\.lock|\.github/workflows)" | head -20

Repository: ubiquity-os/command-demo

Length of output: 50


🏁 Script executed:

# Get the full context of the workflow file
cat -n .github/workflows/update-configuration.yml | head -130 | tail -40

Repository: ubiquity-os/command-demo

Length of output: 2438


🏁 Script executed:

# Check if there's a deno.lock file in the repository
find . -name "deno.lock" -o -name "deno.json" 2>/dev/null | head -20

Repository: ubiquity-os/command-demo

Length of output: 50


🌐 Web query:

Deno --no-lock flag behavior documentation

💡 Result:

--no-lock tells Deno not to auto-discover and use a lockfile (for example, the default deno.lock that would otherwise be picked up when Deno finds your project config). (docs.deno.com)

Context: since Deno v1.28, Deno will automatically discover/use (and create/update) deno.lock when a deno.json(c) is discovered; --no-lock is the documented opt-out for that auto-discovery behavior. (deno.com)

If you want to disable lockfiles via config instead of a CLI flag, you can set "lock": false in deno.json. (docs.deno.com)

Citations:


🌐 Web query:

Deno reproducibility lockfile auto-discovery

💡 Result:

Deno’s lockfile “auto-discovery” works like this:

  • Deno first auto-detects your config file (deno.json / deno.jsonc) by searching the current working directory and then walking up parent directories. You can override with --config. [1]
  • Once a config file is resolved, Deno uses lockfiles by default—and will create/use deno.lock alongside that config (unless configured otherwise). You can also set "lock": { "path": "./deno.lock", "frozen": true } or disable with "lock": false. [1]
  • This behavior was introduced so you no longer need to pass --lock=... manually; since Deno v1.28, the lockfile is automatically discovered and used when a config file is discovered. You can disable with --no-lock. [2]

Sources:
[1] Deno docs: deno.json / lockfile configuration and defaults (docs.deno.com)
[2] Deno v1.28 announcement (auto-discovered lockfiles; --no-lock) (deno.com)

Citations:


Pin Deno version and plugin-manifest-tool to specific versions.

deno-version: v2.x (semver range) and @ubiquity-os/plugin-manifest-tool@latest allow versions to drift over time. Pin both to exact versions (e.g., v2.0.0 and plugin-manifest-tool@1.2.3) for reproducible builds. The --no-lock flags are redundant here since the repository has no deno.json file to trigger lockfile auto-discovery, but the semver ranges and @latest tags are the actual reproducibility concerns.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (2)
.github/workflows/update-configuration.yml (2)

41-41: ⚠️ Potential issue | 🟠 Major

Restrict token scope and pin action refs to immutable SHAs.

Line 41 grants full repo token access, and Lines 94/128/134 use mutable @main while passing sensitive secrets. Please scope permissions minimally and pin these actions to full commit SHAs.

Suggested hardening diff
-    permissions: write-all
+    permissions:
+      contents: write

-        uses: ubiquity-os/action-deploy-plugin@main
+        uses: ubiquity-os/action-deploy-plugin@<full_commit_sha>

-        uses: ubiquity-os/deno-plugin-adapter@main
+        uses: ubiquity-os/deno-plugin-adapter@<full_commit_sha>

-      - uses: ubiquity-os/deno-deploy@main
+      - uses: ubiquity-os/deno-deploy@<full_commit_sha>

Also applies to: 94-94, 128-128, 134-134


75-79: ⚠️ Potential issue | 🟠 Major

Use step output for ACTION_REF in expressions.

Line 142 reads ${{ env.ACTION_REF }}, but Line 78 sets ACTION_REF via $GITHUB_ENV. For workflow expressions, publish ACTION_REF through $GITHUB_OUTPUT and consume steps.refs.outputs.action_ref.

Suggested fix
-          echo "ACTION_REF=${GITHUB_REPOSITORY}@${action_ref_branch}" >> "$GITHUB_ENV"
+          action_ref="${GITHUB_REPOSITORY}@${action_ref_branch}"
+          echo "action_ref=$action_ref" >> "$GITHUB_OUTPUT"
+          echo "ACTION_REF=$action_ref" >> "$GITHUB_ENV"

-          ACTION_REF: ${{ env.ACTION_REF }}
+          ACTION_REF: ${{ steps.refs.outputs.action_ref }}

Also applies to: 142-142


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30d2cc03-1aaa-440d-8500-6d79bea5f6ea

📥 Commits

Reviewing files that changed from the base of the PR and between 40d24a1 and babe993.

📒 Files selected for processing (1)
  • .github/workflows/update-configuration.yml

@gentlementlegen
gentlementlegen merged commit 8467d58 into development Mar 17, 2026
6 checks passed
@gentlementlegen
gentlementlegen deleted the chore/consolidate-deploy-workflows branch March 17, 2026 05:50

This branch was previously deployed

1 inactive deployment
development — babe9930 Deployed Mar 16, 2026 by gentlementlegen via Deploy (Action / Deno) #127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant