From debd0b6832f49bf2a8dca896c5cee51b03327ca7 Mon Sep 17 00:00:00 2001 From: Jonathan Sharman Date: Fri, 3 Feb 2023 10:36:50 -0800 Subject: [PATCH] chore: add manual trigger need two commit messages --- .github/workflows/publish-aggregator.yml | 14 ++++++++++++-- .github/workflows/publish-grafana.yml | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-aggregator.yml b/.github/workflows/publish-aggregator.yml index 8fe8e2d..438f52c 100644 --- a/.github/workflows/publish-aggregator.yml +++ b/.github/workflows/publish-aggregator.yml @@ -9,6 +9,12 @@ on: - aggregator/** - helm/aggregator/** - .github/workflows/publish-aggregator.yml + workflow_dispatch: + inputs: + environment: + description: The target environment + required: true + options: [sandbox, production] env: GITHUB_REGISTRY: ghcr.io @@ -53,7 +59,9 @@ jobs: labels: ${{ steps.meta.outputs.labels }} - name: Set env to Sandbox - if: (github.ref == 'refs/heads/dev' && github.event_name == 'push') + if: | + (github.ref == 'refs/heads/dev' && github.event_name == 'push') || + (github.event.inputs.environment == 'sandbox' && github.event_name == 'workflow_dispatch') run: | cat >> $GITHUB_ENV <> $GITHUB_ENV <> $GITHUB_ENV <> $GITHUB_ENV <