From 4a76eebcc240df9f1d53f4830a28afa87773765b Mon Sep 17 00:00:00 2001 From: John Gathogo Date: Wed, 27 Sep 2023 15:15:15 +0300 Subject: [PATCH] Apply trigger and branch restrictions to workflows (#363) --- .github/workflows/publish_to_production_slot.yml | 5 +---- .github/workflows/publish_to_staging_slot.yml | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/publish_to_production_slot.yml b/.github/workflows/publish_to_production_slot.yml index 9ffbe9a..c658009 100644 --- a/.github/workflows/publish_to_production_slot.yml +++ b/.github/workflows/publish_to_production_slot.yml @@ -5,14 +5,11 @@ name: Publish OData org website to Azure Web App production slot on: - push: - branches: - - master workflow_dispatch: # Makes it possible to trigger workflow manually jobs: publish: - if: github.repository_owner == 'OData' && github.event_name == 'workflow_dispatch' + if: github.repository_owner == 'OData' && github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/publish_to_staging_slot.yml b/.github/workflows/publish_to_staging_slot.yml index 3f39370..5ffc067 100644 --- a/.github/workflows/publish_to_staging_slot.yml +++ b/.github/workflows/publish_to_staging_slot.yml @@ -5,9 +5,6 @@ name: Publish OData org website to Azure Web App staging slot on: - push: - branches: - - master workflow_dispatch: # Makes it possible to trigger workflow manually jobs: