Skip to content

Fix invalid Docker image tag on PR builds#33

Merged
ThisIs-Developer merged 3 commits intomainfrom
copilot/add-share-button-markdown
Mar 4, 2026
Merged

Fix invalid Docker image tag on PR builds#33
ThisIs-Developer merged 3 commits intomainfrom
copilot/add-share-button-markdown

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

The docker/metadata-action {{branch}} placeholder resolves to an empty string on pull_request events, producing the tag :-afc54f8 — an invalid Docker reference that fails the build.

Change

  • .github/workflows/docker-publish.yml: Replace dynamic prefix={{branch}}- with the static prefix=sha-, producing a consistently valid tag (sha-<short-sha>) across both push and pull_request events.
-          type=sha,prefix={{branch}}-
+          type=sha,prefix=sha-
Original prompt

This section details on the original issue you should resolve

<issue_title>Add share button with URL-encoded markdown for easy sharing</issue_title>
<issue_description>## Feature Request: Share Button

Similar to how mermaid-js/mermaid-live-editor allows sharing of diagrams using URL encoding and compression (using pako), I propose implementing a share button for this Markdown viewer:

Expected Behavior

  • Add a Share button in the viewer/editor toolbar.
  • When clicked, the entire markdown content should be compressed (e.g., using pako or lz-string) and encoded as a URL-safe string.
  • The encoded string should be embedded into the URL (preferably in the hash, e.g. #share=).
  • User can share this URL and recipients will see the same markdown content when opening the link, decoded locally in the app.
  • No cloud/server storage needed; data lives in the link itself.

Inspiration

  • See how mermaid-live-editor uses pako for diagram sharing (repo link).
  • This is effective for static sites, enabling state sharing without any backend.

Advantages

  • Fully static – no server or cloud dependency
  • Safe (data not sent to server)
  • Enables easy collaborative sharing and reproducibility

Considerations

  • Handle large documents gracefully (show error if content too large for URL)
  • Use URL fragment instead of query string to avoid leaking content to servers
  • Use clipboard copy fallback in browsers where sharing API is unavailable

Implementation Suggestion

  • Use pako (for consistency with mermaid-live-editor) or optionally lz-string
  • Add decode logic on app load to populate viewer if share fragment is present
  • Add UI for sharing/copying link

</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment Mar 4, 2026 4:53am

Co-authored-by: ThisIs-Developer <109382325+ThisIs-Developer@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 4, 2026

Deploying markdown-viewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 92c2fdf
Status: ✅  Deploy successful!
Preview URL: https://078d9bb9.markdown-viewer.pages.dev
Branch Preview URL: https://copilot-add-share-button-mar.markdown-viewer.pages.dev

View logs

Copilot AI changed the title [WIP] Add share button for URL-encoded markdown sharing Add share button with pako-compressed URL hash for stateless markdown sharing Mar 4, 2026
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 4, 2026

Deploying markdownviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 92c2fdf
Status: ✅  Deploy successful!
Preview URL: https://808e69ee.markdownviewer.pages.dev
Branch Preview URL: https://copilot-add-share-button-mar.markdownviewer.pages.dev

View logs

Co-authored-by: ThisIs-Developer <109382325+ThisIs-Developer@users.noreply.github.com>
Copilot AI changed the title Add share button with pako-compressed URL hash for stateless markdown sharing Fix invalid Docker image tag on PR builds Mar 4, 2026
@ThisIs-Developer ThisIs-Developer merged commit 8424904 into main Mar 4, 2026
6 checks passed
@ThisIs-Developer ThisIs-Developer deleted the copilot/add-share-button-markdown branch March 4, 2026 04:55
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.

Add share button with URL-encoded markdown for easy sharing

2 participants