Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Checkout demo workflow before resolving output

pulse-triage[bot]70acab1703be
diff --git a/.github/workflows/update-demo-server.yml b/.github/workflows/update-demo-server.yml
index c457385175..996f7bda56 100644
--- a/.github/workflows/update-demo-server.yml
+++ b/.github/workflows/update-demo-server.yml
@@ -74,6 +74,13 @@ jobs:
mock_update_interval: ${{ steps.runtime_profile.outputs.mock_update_interval }}
steps:
+ - name: Checkout repository
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+ fetch-depth: 0
+ fetch-tags: true
+
- name: Resolve target tag and demo environment
id: target
env:
@@ -137,13 +144,6 @@ jobs:
echo "environment_name=$ENVIRONMENT_NAME" >> "$GITHUB_OUTPUT"
echo "Resolved demo deployment: tag=${TAG}, target=${TARGET}, environment=${ENVIRONMENT_NAME}"
- - name: Checkout repository
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- with:
- persist-credentials: false
- fetch-depth: 0
- fetch-tags: true
-
- name: Validate governed release line for selected tag
env:
WORKFLOW_OUTPUT_1: ${{ steps.target.outputs.tag }}
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index 71d1d4f4c9..2dc44f5b9f 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -3774,6 +3774,10 @@ bypass the preflight. That dry run must call `update-demo-server.yml` in
verification-only mode against the latest stable release. It must prove
Tailscale, SSH host identity, runtime version, frontend parity, public health,
and browser smoke without changing the host.
+The reusable demo workflow's resolver must check out the repository before it
+calls `scripts/write_github_output.py` to emit the selected tag and target.
+This checkout is credential-free; a verification-only dry run must not fail
+before its demo checks merely because the output helper is absent.
That same release-validation boundary also owns draft-versus-published asset
state. Every normal `.github/workflows/create-release.yml` cut validates the
uploaded packet while the release is still a draft and must pass `draft=true`
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.go
index a64578e473..05b87acc70 100644
--- a/scripts/installtests/build_release_assets_test.go
+++ b/scripts/installtests/build_release_assets_test.go
@@ -2392,6 +2392,29 @@ func TestUpdateDemoWorkflowUsesGovernedNetworkPath(t *testing.T) {
}
}
+func TestUpdateDemoResolverChecksOutOutputHelperBeforeUse(t *testing.T) {
+ workflowBytes, err := os.ReadFile(repoFile(".github", "workflows", "update-demo-server.yml"))
+ if err != nil {
+ t.Fatalf("read update-demo-server workflow: %v", err)
+ }
+ workflow := string(workflowBytes)
+ resolveStart := strings.Index(workflow, "\n resolve:\n")
+ updateStart := strings.Index(workflow, "\n update-demo:\n")
+ if resolveStart < 0 || updateStart <= resolveStart {
+ t.Fatal("update-demo-server workflow must retain separate resolve and update-demo jobs")
+ }
+ resolve := workflow[resolveStart:updateStart]
+ checkout := strings.Index(resolve, "- name: Checkout repository")
+ target := strings.Index(resolve, "- name: Resolve target tag and demo environment")
+ helper := strings.Index(resolve, "python3 scripts/write_github_output.py tag \"$TAG\"")
+ if checkout < 0 || target <= checkout || helper <= target {
+ t.Fatal("demo resolver must check out its source before using scripts/write_github_output.py")
+ }
+ if !strings.Contains(resolve[checkout:target], "persist-credentials: false") {
+ t.Fatal("demo resolver checkout must not persist GitHub credentials")
+ }
+}
+
func TestDemoMutationAndRecoverySharePhysicalTargetLock(t *testing.T) {
updateBytes, err := os.ReadFile(repoFile(".github", "workflows", "update-demo-server.yml"))
if err != nil {