Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/production-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .test/release-workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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'
Expand Down