Skip to content

ci: migrate deploy workflow to new deno-deploy flow - #65

Merged
gentlementlegen merged 5 commits into
developmentfrom
issue-17-deno-deploy-workflow
Apr 10, 2026
Merged

ci: migrate deploy workflow to new deno-deploy flow #65
gentlementlegen merged 5 commits into
developmentfrom
issue-17-deno-deploy-workflow

Conversation

@gentlementlegen

@gentlementlegen gentlementlegen commented Apr 7, 2026

Copy link
Copy Markdown
Member

Summary

  • switch the deploy workflow to the new provision / publish-manifest / delete deno-deploy flow
  • add the routed Deno manifest publication trigger
  • replace the legacy deployctl-era inputs with the new Deno Deploy action inputs

Notes

-this references ubiquity-os/deno-deploy@issue-17-deno-deploy-app-migration until that PR is merged
-this workflow now expects DENO_DEPLOY_TOKEN

Closes ubiquity-os/deno-deploy#17
Depends on ubiquity-os/deno-deploy#30

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Refactors the GitHub Actions workflow to a resolve-context job that computes ref classification, environment targets, action selection, and execution gates, then conditionally runs publish-action-artifact and deploy-deno using those outputs. Changes workflow_dispatch input skip_bot_events default to "false". Updates src/worker.ts to build a per-request runtime manifest (setting homepage_url) and serve it at /manifest.json. Tests now assert the served manifest includes homepage_url. package.json script invocation and the @ubiquity-os/plugin-sdk range were updated.

Possibly related PRs

  • plugin-template PR 64: Modifies the same workflow file and refactors deploy logic into centralized context resolution and conditional downstream jobs.
  • plugin-template PR 60: Adjusts workflow inputs/outputs related to bot/event exclusion (skipBotEvents / excludeSupportedEvents) used by deployment steps.
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning PR description includes summary and notes but is missing the required issue link (should use 'Resolves #' keyword per template). Replace 'Closes ubiquity-os/deno-deploy#17' with 'Resolves #17' at the top to follow the required template format and ensure proper linking.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main workflow refactoring: migrating the CI/CD deploy workflow to use a new Deno Deploy flow.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-17-deno-deploy-workflow

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

🧹 Nitpick comments (1)
.github/workflows/update-configuration.yml (1)

137-160: Scope GITHUB_TOKEN more tightly than write-all.

Both downstream jobs hand a repo-wide write token to external actions. Please trim job permissions to the minimum required once the exact scopes are known. GitHub recommends least-privilege workflow/job permissions. (wellarchitected.github.com)


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a5337413-be49-4e5a-957d-eaa3eb016ab5

📥 Commits

Reviewing files that changed from the base of the PR and between 349787d and 6fa3cb8.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/update-configuration.yml
  • package.json

Comment thread .github/workflows/update-configuration.yml
Comment on lines +147 to +149
pluginEntry: "${{ github.workspace }}/src/worker.ts"
excludeSupportedEvents: ${{ needs.resolve-context.outputs.exclude_supported_events }}
skipBotEvents: ${{ needs.resolve-context.outputs.skip_bot_events }}

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 the workflow file around lines 147-149
sed -n '140,155p' .github/workflows/update-configuration.yml

Repository: ubiquity-os/plugin-template

Length of output: 711


🏁 Script executed:

# Check what's exported from src/worker.ts
head -30 src/worker.ts

Repository: ubiquity-os/plugin-template

Length of output: 1239


🏁 Script executed:

# Check what's exported from src/action.ts
head -30 src/action.ts

Repository: ubiquity-os/plugin-template

Length of output: 938


🏁 Script executed:

# Get broader context of the artifact job in the workflow
sed -n '130,160p' .github/workflows/update-configuration.yml

Repository: ubiquity-os/plugin-template

Length of output: 1311


Use the Actions entrypoint for the artifact build.

src/worker.ts is the Cloudflare Workers runtime entrypoint (createPlugin), while src/action.ts is the GitHub Actions entrypoint (createActionsPlugin). The artifact job publishes a GitHub Action, so it should use src/action.ts.

Suggested change
-          pluginEntry: "${{ github.workspace }}/src/worker.ts"
+          pluginEntry: "${{ github.workspace }}/src/action.ts"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pluginEntry: "${{ github.workspace }}/src/worker.ts"
excludeSupportedEvents: ${{ needs.resolve-context.outputs.exclude_supported_events }}
skipBotEvents: ${{ needs.resolve-context.outputs.skip_bot_events }}
pluginEntry: "${{ github.workspace }}/src/action.ts"
excludeSupportedEvents: ${{ needs.resolve-context.outputs.exclude_supported_events }}
skipBotEvents: ${{ needs.resolve-context.outputs.skip_bot_events }}


- uses: ubiquity-os/deno-deploy@main
if: ${{ env.DEPLOY_DENO_ENABLED == 'true' && steps.refs.outputs.is_tag_ref != 'true' && steps.refs.outputs.is_artifact_ref != 'true' }}
- uses: ubiquity-os/deno-deploy@issue-17-deno-deploy-app-migration

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 if the repository exists and find available refs
curl -s "https://api.github.com/repos/ubiquity-os/deno-deploy" | jq -r '.name, .description, .url' 2>/dev/null || echo "Repo check via API"

Repository: ubiquity-os/plugin-template

Length of output: 161


🌐 Web query:

GitHub Actions security hardening recommendations action pinning best practices

💡 Result:

GitHub Actions security hardening (with action pinning best practices)

1) Pin every third‑party action to a full commit SHA (not a branch, not @vX, not @main)

  • Use:
    - uses: actions/checkout@<full_length_commit_sha> # v4
  • Rationale: tags/branches are mutable; a compromised tag update can change what your workflow executes. GitHub explicitly recommends full-SHA pinning for this reason. (docs.github.com)

2) Keep pinned SHAs updated automatically (don’t “set and forget”)

  • Enable Dependabot version updates for GitHub Actions so it raises PRs when newer action versions are available (even when you use SHAs). (docs.github.com)

3) Enforce pinning (and optionally restrict which actions can run)

  • Use repository/org Actions policies to (a) require SHA pinning and (b) control which actions/reusable workflows are allowed. (github.blog)

4) Lock down GITHUB_TOKEN permissions (least privilege)

  • Set default token permissions to the minimum needed, and override per job where required:
    permissions:
      contents: read
  • GitHub’s hardening guidance highlights how a single compromised action can become high-impact if it has broad token permissions and access to secrets. (docs.github.com)

5) Prefer OIDC over long‑lived cloud credentials in secrets

  • Use GitHub’s OpenID Connect integration to mint short-lived, workload-identity tokens for cloud deploys (AWS/GCP/Azure), instead of storing static cloud keys in GitHub Secrets. (docs.github.com)

6) Treat PRs (especially from forks) as untrusted input

  • Follow GitHub’s guidance to avoid script-injection patterns and reduce impact by limiting permissions/secrets exposure; GitHub also notes fork PR workflows run with minimal privileges by default. (docs.github.com)

If you paste a sample workflow, I can point out exactly what to pin, what permissions: can be reduced to, and where OIDC would replace stored credentials.

Citations:


🏁 Script executed:

# Also check the file to confirm the line and context
if [ -f .github/workflows/update-configuration.yml ]; then
  sed -n '160,170p' .github/workflows/update-configuration.yml
fi

Repository: ubiquity-os/plugin-template

Length of output: 501


Pin ubiquity-os/deno-deploy to a full commit SHA.

@issue-17-deno-deploy-app-migration is a mutable branch ref. Upstream rebases or force-pushes can change deployment behavior without alerting this repo. GitHub security hardening explicitly recommends pinning actions to full-length commit SHAs.

Suggested change
-      - uses: ubiquity-os/deno-deploy@issue-17-deno-deploy-app-migration
+      - uses: ubiquity-os/deno-deploy@<full-commit-sha> # issue-17-deno-deploy-app-migration

@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: 1

🧹 Nitpick comments (3)
.github/workflows/update-configuration.yml (3)

41-41: Consider explicit minimal permissions instead of read-all.

read-all works but is broader than necessary. For a context-resolution job, contents: read would suffice and better follow least-privilege.

Suggested change
-    permissions: read-all
+    permissions:
+      contents: read

134-134: Scope down write-all permissions.

write-all grants unnecessary access. Specify only required permissions (e.g., contents: write).

Suggested change
-    permissions: write-all
+    permissions:
+      contents: write

156-156: Scope down write-all permissions.

Same as above—specify only necessary permissions for the Deno deploy job.

Suggested change
-    permissions: write-all
+    permissions:
+      contents: read
+      deployments: write

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b1a3805d-2d0e-437d-ad5d-581f863f603d

📥 Commits

Reviewing files that changed from the base of the PR and between 7aa4852 and 5e03fa7.

📒 Files selected for processing (3)
  • .github/workflows/update-configuration.yml
  • tests/__mocks__/helpers.ts
  • tests/main.test.ts
✅ Files skipped from review due to trivial changes (1)
  • tests/mocks/helpers.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/main.test.ts

with:
pluginEntry: "./worker"
steps:
- uses: actions/checkout@v6

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

🌐 Web query:

What is the latest version of actions/checkout GitHub Action?

💡 Result:

The latest stable release of actions/checkout is v5.0.1 (so you’d typically use uses: actions/checkout@v5). (github.com)

Citations:


Use actions/checkout@v5 instead of v6.

The latest stable version of actions/checkout is v5.0.1, not v6. Update line 160 to use @v5. Additionally, consider SHA-pinning by using the full commit hash (e.g., actions/checkout@5a4ac9002d0be2fb38641e34605410775e73a978) for improved supply chain security.

@gentlementlegen
gentlementlegen merged commit df7e03a into development Apr 10, 2026
7 of 8 checks passed
@gentlementlegen
gentlementlegen deleted the issue-17-deno-deploy-workflow branch April 10, 2026 06:22
@ubiquity-os-beta

ubiquity-os-beta Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

 [ 8.28 UUSD ] 

@gentlementlegen
Contributions Overview
ViewContributionCountReward
ReviewSpecification18.28
Conversation Incentives
CommentFormattingRelevancePriorityReward
## Summary- switch the deploy workflow to the new provision / …
4.14
content:
  content:
    h2:
      score: 1
      elementCount: 2
    ul:
      score: 0
      elementCount: 1
    li:
      score: 0.1
      elementCount: 3
    p:
      score: 0
      elementCount: 2
  result: 2.3
regex:
  wordCount: 71
  wordValue: 0.1
  result: 1.84
authorship: 1
Relevance: 1
Readability: 0.0
18.28

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.

Upgrade to newest Deno Deploy

1 participant