From 05bde724915adc7367615429f31f31293713c93b Mon Sep 17 00:00:00 2001 From: "v.savkin" Date: Sun, 4 Oct 2026 19:09:57 +0600 Subject: [PATCH] feat: Samples shows releases and nightly only; pull requests are checked inside the template --- .github/workflows/regenerate.yml | 14 +------------- .samples/variants.json | 31 ------------------------------- 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/.github/workflows/regenerate.yml b/.github/workflows/regenerate.yml index 4680770..65668e3 100644 --- a/.github/workflows/regenerate.yml +++ b/.github/workflows/regenerate.yml @@ -20,10 +20,6 @@ on: description: Regenerate even when the latest release is already here type: boolean default: false - ref: - description: A branch of the template to generate the preview branches from, for a pull request under review; empty for the daily check - type: string - default: '' permissions: contents: read @@ -44,21 +40,13 @@ jobs: env: GH_TOKEN: ${{ github.token }} FORCE: ${{ inputs.force }} - PREVIEW_REF: ${{ inputs.ref }} run: | - # A pull request of the template under review: only the preview branches, from its branch. - if [ -n "$PREVIEW_REF" ]; then - echo "tag=$PREVIEW_REF" >> "$GITHUB_OUTPUT" - echo "branches=$(jq -c --arg f "$PREVIEW_REF" '[.[] | select(.onDemand == true) | {branch, from: $f}]' .samples/variants.json)" >> "$GITHUB_OUTPUT" - echo "regenerate=true" >> "$GITHUB_OUTPUT" - exit 0 - fi tag=$(gh release view -R "$TEMPLATE_REPO" --json tagName -q .tagName) here=$(cat template-version 2>/dev/null || echo none) echo "latest release $tag, release samples from $here" echo "tag=$tag" >> "$GITHUB_OUTPUT" todo='[]' - for row in $(jq -c '.[] | select(.onDemand != true) | {branch, ref}' .samples/variants.json); do + for row in $(jq -c '.[] | {branch, ref}' .samples/variants.json); do branch=$(jq -r .branch <<< "$row"); ref=$(jq -r '.ref // empty' <<< "$row") if [ -n "$ref" ]; then # A branch of the template: regenerated when that branch has moved. diff --git a/.samples/variants.json b/.samples/variants.json index 4d80918..19eb689 100644 --- a/.samples/variants.json +++ b/.samples/variants.json @@ -32,36 +32,5 @@ "-N ST -P DotNetSolutionKit.Samples -S Orders -M false --GitHubCiCd true --Messaging outbox -I true --DiffApi true --FeatureFlags true --HierarchyRules true --Storage true --ClickHouse true", "-N ST -P DotNetSolutionKit.Samples -S Billing --Messaging outbox -I true --DiffApi true --FeatureFlags true --Storage true --ClickHouse true" ] - }, - { - "branch": "preview", - "ref": "master", - "onDemand": true, - "about": "The flags of full and a gateway in front, generated on demand from a branch of the template under review: its pull request merges only when this CI is green too.", - "generate": [ - "-N ST -P DotNetSolutionKit.Samples -S Orders -M false --GitHubCiCd true --Messaging outbox -I true --DiffApi true --FeatureFlags true --HierarchyRules true --Storage true --ClickHouse true", - "-N ST -P DotNetSolutionKit.Samples -S Billing --Messaging outbox -I true --DiffApi true --FeatureFlags true --Storage true --ClickHouse true", - "-N ST -P DotNetSolutionKit.Samples -S Gateway --ApiGateway true" - ] - }, - { - "branch": "preview-vault", - "ref": "master", - "onDemand": true, - "about": "Secrets from HashiCorp Vault instead of Infisical, with the bus, the audit journal and the API diff; generated on demand with preview, from the branch of the template under review.", - "generate": [ - "-N ST -P DotNetSolutionKit.Samples -S Orders -M false --GitHubCiCd true --Vault true --Messaging outbox --Audit true --DiffApi true", - "-N ST -P DotNetSolutionKit.Samples -S Billing --Vault true --Messaging outbox --Audit true --DiffApi true" - ] - }, - { - "branch": "preview-mssql", - "ref": "master", - "onDemand": true, - "about": "SQL Server instead of PostgreSQL, with the bus, the audit journal, feature flags and the API diff; generated on demand with preview, from the branch of the template under review.", - "generate": [ - "-N ST -P DotNetSolutionKit.Samples -S Orders -M false --GitHubCiCd true --Database mssql --Messaging outbox --Audit true --FeatureFlags true --DiffApi true", - "-N ST -P DotNetSolutionKit.Samples -S Billing --Database mssql --Messaging outbox --Audit true --FeatureFlags true --DiffApi true" - ] } ]