From 6d6403ece97334a6d5dcba6dbef7df0d76ac4942 Mon Sep 17 00:00:00 2001 From: Karolis Date: Wed, 9 Sep 2026 23:19:27 +0400 Subject: [PATCH] Run production validation from release workflow --- .github/workflows/production-e2e.yml | 2 +- .test/release-workflow.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/production-e2e.yml b/.github/workflows/production-e2e.yml index 59fc401..ece1cdb 100644 --- a/.github/workflows/production-e2e.yml +++ b/.github/workflows/production-e2e.yml @@ -48,7 +48,7 @@ permissions: jobs: production-e2e: name: Production Live Delivery (k3s) - if: github.event_name == 'workflow_call' || inputs.confirmation == 'production' + if: (github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, '0.')) || (github.event_name == 'workflow_dispatch' && inputs.confirmation == 'production') runs-on: ubuntu-latest timeout-minutes: 22 environment: production diff --git a/.test/release-workflow.sh b/.test/release-workflow.sh index eb1f78b..cbf18bd 100755 --- a/.test/release-workflow.sh +++ b/.test/release-workflow.sh @@ -3,6 +3,7 @@ set -Eeuo pipefail readonly WORKFLOW=".github/workflows/release.yml" +readonly PRODUCTION_WORKFLOW=".github/workflows/production-e2e.yml" job_block() { local job="$1" @@ -29,6 +30,9 @@ assert_needs chart-publication '[image, image-validation, version-promotion]' assert_needs promote '[image, chart-publication]' assert_needs release '[image, promote]' +grep -Fqx " if: (github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, '0.')) || (github.event_name == 'workflow_dispatch' && inputs.confirmation == 'production')" \ + "${PRODUCTION_WORKFLOW}" + [[ "$(grep -c '^ release:$' "${WORKFLOW}")" == "1" ]] job_block release | grep -Fq 'gh release create' job_block promote | grep -Fq 'image-release.sh promote-latest'