create public build endpoint
All checks were successful
App Image CI / Build app image (pull_request) Successful in -1m26s
NPM Audit Check / Check NPM audit (pull_request) Successful in -2m14s

This commit is contained in:
2025-09-23 19:15:19 -05:00
parent b20bbf40fc
commit 77441fe7ed
5 changed files with 108 additions and 62 deletions

View File

@@ -12,18 +12,21 @@
<h2 id="buildStatus"><%= build.status %></h2>
<div class="overflow-x">
<div class="grid-2col">
<label>Repo</label> <span><%= build.repo %></span>
<label>Repo</label> <span><span><%= build.repo %></span> <button class="copybtn">Copy</button></span>
<label>Commit</label> <span><% if (build.commit) { %><%= build.commit %><% } else { %>latest<% } %></span>
<label>Patch</label> <span><% if (build.patch) { %><a href="/build/<%= build.sqid %>/patch">patch file</a><% } else { %>none<% } %></span>
<label>Distro</label> <span><%= build.distro %></span>
<label>Dependencies</label> <span><%= build.dependencies %></span>
<label>Start time</label> <span class="to-local-time"><%= build.startTime %></span>
<% if (build.userId !== '-1') { %>
<% if (build.userId && build.userId !== '-1') { %>
<label>Triggered by</label> <span><%= build.user.displayName %> (<%= build.user.username %>)</span>
<% } %>
<% if (locals.shareable) { %>
<label>Shareable link</label> <span><a href="<%= shareable %>"><%= shareable %></a> <button class="copybtn">Copy</button></span>
<% } %>
</div>
</div>
<% if (build.sqid) { %>
<% if (build.sqid && !public) { %>
<div>
<a href="/build?id=<%= build.sqid %>" class="button">Clone</a>
</div>
@@ -44,6 +47,7 @@
</div>
<%- include("footer", locals) %>
<script src="/assets/js/timezone.js?v1" nonce="<%= cspNonce %>"></script>
<script src="/assets/js/copy.js?v1" nonce="<%= cspNonce %>"></script>
<% if (!ended) { %>
<script src="/assets/js/build.js?v3" nonce="<%= cspNonce %>"></script>
<% } %>