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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
fix: prevent race conditions in release workflows
rcourtman8bea6c6b99fa
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.ymlindex 93488c527b..3dd00be3be 100644--- a/.github/workflows/create-release.yml+++ b/.github/workflows/create-release.yml@@ -493,6 +493,34 @@ jobs:echo "✓ Docker publish workflow dispatched"+ - name: Trigger floating tag promotion+ if: ${{ github.event.inputs.draft_only != 'true' }}+ continue-on-error: true # Non-fatal if dispatch fails+ env:+ GH_TOKEN: ${{ secrets.WORKFLOW_PAT }}+ run: |+ TAG="${{ needs.extract_version.outputs.tag }}"+ IS_PRERELEASE="${{ needs.extract_version.outputs.is_prerelease }}"+ echo "Triggering floating tag promotion for ${TAG} (prerelease: ${IS_PRERELEASE})..."++ gh workflow run promote-floating-tags.yml -f tag="${TAG}" -f prerelease="${IS_PRERELEASE}"++ echo "✓ Floating tag promotion workflow dispatched"++ - name: Trigger Helm chart release+ if: ${{ github.event.inputs.draft_only != 'true' }}+ continue-on-error: true # Non-fatal if dispatch fails+ env:+ GH_TOKEN: ${{ secrets.WORKFLOW_PAT }}+ run: |+ TAG="${{ needs.extract_version.outputs.tag }}"+ VERSION="${TAG#v}"+ echo "Triggering Helm chart release for ${VERSION}..."++ gh workflow run helm-pages.yml -f chart_version="${VERSION}"++ echo "✓ Helm chart release workflow dispatched"+- name: Trigger demo server updateif: ${{ github.event.inputs.draft_only != 'true' }}continue-on-error: true # Non-fatal if dispatch failsdiff --git a/.github/workflows/helm-pages.yml b/.github/workflows/helm-pages.ymlindex 277252cdf5..59ba0f702f 100644--- a/.github/workflows/helm-pages.yml+++ b/.github/workflows/helm-pages.yml@@ -1,8 +1,8 @@name: Release Helm Chart to GitHub Pages+# Only triggered manually or by create-release.yml+# Removing release: published trigger prevents race conditionson:- release:- types: [published]workflow_dispatch:inputs:chart_version:@@ -45,26 +45,19 @@ jobs:helm-docs# Commit if README changed- if [ "${GITHUB_EVENT_NAME}" != "release" ] && ! git diff --quiet README.md; then+ if ! git diff --quiet README.md; thengit config user.name "$GITHUB_ACTOR"git config user.email "[email protected]"git add README.mdgit commit -m "Auto-update Helm chart documentation"git push- elif [ "${GITHUB_EVENT_NAME}" = "release" ] && ! git diff --quiet README.md; then- echo "README.md updated by helm-docs but skipping commit because release workflows checkout a detached HEAD."ficd ../../..- name: Determine chart versionid: versionrun: |- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then- VERSION="${{ inputs.chart_version }}"- else- VERSION="${{ github.event.release.tag_name }}"- VERSION="${VERSION#v}"- fi+ VERSION="${{ inputs.chart_version }}"echo "version=$VERSION" >> "$GITHUB_OUTPUT"- name: Update Chart.yaml version@@ -73,15 +66,13 @@ jobs:sed -i "s/^version: .*/version: $VERSION/" deploy/helm/pulse/Chart.yamlsed -i "s/^appVersion: .*/appVersion: \"$VERSION\"/" deploy/helm/pulse/Chart.yaml- # Commit only on workflow_dispatch (release runs are detached HEAD)- if [ "${GITHUB_EVENT_NAME}" != "release" ] && ! git diff --quiet deploy/helm/pulse/Chart.yaml; then+ # Commit if Chart.yaml changed+ if ! git diff --quiet deploy/helm/pulse/Chart.yaml; thengit config user.name "$GITHUB_ACTOR"git config user.email "[email protected]"git add deploy/helm/pulse/Chart.yamlgit commit -m "Auto-update Helm chart version to $VERSION"git push- elif [ "${GITHUB_EVENT_NAME}" = "release" ] && ! git diff --quiet deploy/helm/pulse/Chart.yaml; then- echo "Chart.yaml updated for packaging, skipping commit (detached HEAD on release event)."fi- name: Validate Helm chartdiff --git a/.github/workflows/promote-floating-tags.yml b/.github/workflows/promote-floating-tags.ymlindex c3c4615b33..20e25880d8 100644--- a/.github/workflows/promote-floating-tags.yml+++ b/.github/workflows/promote-floating-tags.yml@@ -1,8 +1,19 @@name: Promote Floating Tags+# Only triggered by create-release.yml after Docker images are published+# This prevents race conditions with release: published eventon:- release:- types: [published]+ workflow_dispatch:+ inputs:+ tag:+ description: 'Release tag (e.g., v5.0.0)'+ required: true+ type: string+ prerelease:+ description: 'Is this a prerelease?'+ required: true+ type: boolean+ default: falsejobs:promote-images:@@ -12,8 +23,8 @@ jobs:packages: writeenv:OWNER: ${{ github.repository_owner }}- TAG: ${{ github.event.release.tag_name }}- PRERELEASE: ${{ github.event.release.prerelease }}+ TAG: ${{ inputs.tag }}+ PRERELEASE: ${{ inputs.prerelease }}steps:- name: Log in to Docker Hub@@ -29,6 +40,23 @@ jobs:username: ${{ github.actor }}password: ${{ secrets.GITHUB_TOKEN }}+ - name: Wait for Docker image to be available+ run: |+ echo "Waiting for rcourtman/pulse:${TAG} to be available..."+ MAX_ATTEMPTS=30+ ATTEMPT=0+ while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do+ if docker manifest inspect rcourtman/pulse:${TAG} > /dev/null 2>&1; then+ echo "Image rcourtman/pulse:${TAG} is available!"+ exit 0+ fi+ ATTEMPT=$((ATTEMPT + 1))+ echo "Attempt $ATTEMPT/$MAX_ATTEMPTS - Image not yet available, waiting 10s..."+ sleep 10+ done+ echo "Timeout waiting for Docker image"+ exit 1+- name: Promote Pulse server image tagsrun: |set -euo pipefaildiff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.ymlindex eeaec831c8..546222413c 100644--- a/.github/workflows/publish-docker.yml+++ b/.github/workflows/publish-docker.yml@@ -1,8 +1,8 @@name: Publish Docker Images+# Only triggered by create-release.yml after staging images are built+# Removing release: published trigger prevents race conditionson:- release:- types: [published]workflow_dispatch:inputs:tag:@@ -11,7 +11,7 @@ on:type: stringconcurrency:- group: docker-publish-${{ github.event.release.tag_name || inputs.tag }}+ group: docker-publish-${{ inputs.tag }}cancel-in-progress: falsejobs:@@ -26,7 +26,7 @@ jobs:- name: Extract version from release tagid: versionrun: |- TAG="${{ github.event.release.tag_name || inputs.tag }}"+ TAG="${{ inputs.tag }}"VERSION="${TAG#v}"# Detect if this is a prerelease (RC, alpha, beta)