From 8d86637d3ffb7ae5d6570dd4423041a77ddf1c76 Mon Sep 17 00:00:00 2001 From: Sanskar Jaiswal Date: Wed, 31 May 2023 17:07:26 +0530 Subject: [PATCH] e2e: run e2e Azure tests for PRs to main if tests or wofklow changes Run e2e Azure tests for PRs and commits to main if the `tests` directory or the Azure workflow itself changes. Signed-off-by: Sanskar Jaiswal --- .github/workflows/e2e-azure.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-azure.yaml b/.github/workflows/e2e-azure.yaml index 54133b1d..5caaedd4 100644 --- a/.github/workflows/e2e-azure.yaml +++ b/.github/workflows/e2e-azure.yaml @@ -5,7 +5,17 @@ on: schedule: - cron: '0 6 * * *' push: - branches: [ azure* ] + branches: + - main + paths: + - 'tests/**' + - '.github/workflows/e2e-azure.yaml' + pull_request: + branches: + - main + paths: + - 'tests/**' + - '.github/workflows/e2e-azure.yaml' permissions: contents: read @@ -13,6 +23,7 @@ permissions: jobs: e2e-amd64-aks: runs-on: ubuntu-22.04 + if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && github.actor != 'dependabot[bot]' steps: - name: Checkout uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2