From e438bac0f5dd7d487aae054802b5255612749252 Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Sat, 13 Jul 2024 17:23:08 +0200 Subject: [PATCH] feat: make notifications optional --- .github/workflows/deployment-docker-image.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deployment-docker-image.yml b/.github/workflows/deployment-docker-image.yml index e0f353995..6121cd187 100644 --- a/.github/workflows/deployment-docker-image.yml +++ b/.github/workflows/deployment-docker-image.yml @@ -6,7 +6,13 @@ on: - closed branches: - main - workflow_dispatch: {} + workflow_dispatch: + inputs: + send-notifications: + type: boolean + required: false + default: true + description: Send notifications permissions: contents: write @@ -29,6 +35,7 @@ jobs: node-version: [20] steps: - name: Discord notification + if: ${{ github.events.inputs.send-notifications }} env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} uses: Ilshidur/action-discord@master @@ -42,6 +49,7 @@ jobs: token: ${{ github.token }} branch: dev - name: Discord notification + if: ${{ github.events.inputs.send-notifications }} env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} uses: Ilshidur/action-discord@master @@ -60,6 +68,7 @@ jobs: - name: Build artifacts run: pnpm build - name: Discord notification + if: ${{ github.events.inputs.send-notifications }} env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} uses: Ilshidur/action-discord@master @@ -92,6 +101,7 @@ jobs: env: SKIP_ENV_VALIDATION: true - name: Discord notification + if: ${{ github.events.inputs.send-notifications }} env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} uses: Ilshidur/action-discord@master