From 297aa7042038dd680d2e8ab7e1c31aacede9da9e Mon Sep 17 00:00:00 2001 From: Preet Shah <48907607+preetsshah@users.noreply.github.com> Date: Thu, 21 Dec 2023 20:20:12 +0530 Subject: [PATCH] Fix issue for forked Cypress workflows (#14463) --- .github/workflows/cypress-integration-tests-mysql-skip.yml | 2 +- .github/workflows/cypress-integration-tests-mysql.yml | 4 ++-- .../workflows/cypress-integration-tests-postgresql-skip.yml | 2 +- .github/workflows/cypress-integration-tests-postgresql.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cypress-integration-tests-mysql-skip.yml b/.github/workflows/cypress-integration-tests-mysql-skip.yml index e664cb0d9bbc..f294db561699 100644 --- a/.github/workflows/cypress-integration-tests-mysql-skip.yml +++ b/.github/workflows/cypress-integration-tests-mysql-skip.yml @@ -14,7 +14,7 @@ name: MySQL Cypress Integration Tests on: schedule: - cron: '30 0 * * *' - pull_request: + pull_request_target: types: - labeled - opened diff --git a/.github/workflows/cypress-integration-tests-mysql.yml b/.github/workflows/cypress-integration-tests-mysql.yml index 8bc90e5fcfa7..1b2ee0939799 100644 --- a/.github/workflows/cypress-integration-tests-mysql.yml +++ b/.github/workflows/cypress-integration-tests-mysql.yml @@ -18,7 +18,7 @@ on: workflow_dispatch: schedule: - cron: '30 0 * * *' - pull_request: + pull_request_target: types: - labeled - opened @@ -39,7 +39,7 @@ jobs: cypress-ci-mysql: if: | github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - || ( github.event_name == 'pull_request' + || ( github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'e2e') && github.event.pull_request.draft == false ) diff --git a/.github/workflows/cypress-integration-tests-postgresql-skip.yml b/.github/workflows/cypress-integration-tests-postgresql-skip.yml index bbd841d60fd9..75ae1776fa10 100644 --- a/.github/workflows/cypress-integration-tests-postgresql-skip.yml +++ b/.github/workflows/cypress-integration-tests-postgresql-skip.yml @@ -14,7 +14,7 @@ name: PostgreSQL Cypress Integration Tests on: schedule: - cron: '30 0 * * *' - pull_request: + pull_request_target: types: - labeled - opened diff --git a/.github/workflows/cypress-integration-tests-postgresql.yml b/.github/workflows/cypress-integration-tests-postgresql.yml index f84104f11032..11f39e55b94f 100644 --- a/.github/workflows/cypress-integration-tests-postgresql.yml +++ b/.github/workflows/cypress-integration-tests-postgresql.yml @@ -18,7 +18,7 @@ on: workflow_dispatch: schedule: - cron: '30 0 * * *' - pull_request: + pull_request_target: types: - labeled - opened @@ -39,7 +39,7 @@ jobs: cypress-ci-postgresql: if: | github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' - || ( github.event_name == 'pull_request' + || ( github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'e2e') && github.event.pull_request.draft == false )