From 1f67c74095d0c08ccab30861161708959e6b878a Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Mon, 31 Oct 2022 11:30:26 +0100 Subject: [PATCH 1/3] Change contracts workflow to deploy only on push --- .github/workflows/contracts-e2e-tests-and-deploy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/contracts-e2e-tests-and-deploy.yaml b/.github/workflows/contracts-e2e-tests-and-deploy.yaml index 8c14550c1f..23b1324bba 100644 --- a/.github/workflows/contracts-e2e-tests-and-deploy.yaml +++ b/.github/workflows/contracts-e2e-tests-and-deploy.yaml @@ -130,6 +130,7 @@ jobs: build_and_deploy_contracts: name: Deploy contracts on feature environment + if: github.event_name == 'push' needs: [run-tests] runs-on: ubuntu-20.04 steps: From b0d9799f1af5d6c1ff2c2f9b03d6aee532ebe07c Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Mon, 31 Oct 2022 11:54:31 +0100 Subject: [PATCH 2/3] Change the workflow to run tests on every push but deploy only on benjamin --- .github/workflows/contracts-e2e-tests-and-deploy.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/contracts-e2e-tests-and-deploy.yaml b/.github/workflows/contracts-e2e-tests-and-deploy.yaml index 23b1324bba..e79ff01f2f 100644 --- a/.github/workflows/contracts-e2e-tests-and-deploy.yaml +++ b/.github/workflows/contracts-e2e-tests-and-deploy.yaml @@ -9,8 +9,6 @@ on: paths: - 'contracts/**' - '.github/**' - branches: - - benjamin concurrency: group: ${{ github.workflow }} @@ -130,7 +128,7 @@ jobs: build_and_deploy_contracts: name: Deploy contracts on feature environment - if: github.event_name == 'push' + if: github.event_name == 'push' and github.ref_name == 'benjamin' needs: [run-tests] runs-on: ubuntu-20.04 steps: From a6ebb1f5b0dd0465a2595ab6e35d0970d1f9eb39 Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Mon, 31 Oct 2022 12:15:26 +0100 Subject: [PATCH 3/3] Fix invalid keyword for 'and' in the workflow condition --- .github/workflows/contracts-e2e-tests-and-deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/contracts-e2e-tests-and-deploy.yaml b/.github/workflows/contracts-e2e-tests-and-deploy.yaml index e79ff01f2f..7c9fca11ec 100644 --- a/.github/workflows/contracts-e2e-tests-and-deploy.yaml +++ b/.github/workflows/contracts-e2e-tests-and-deploy.yaml @@ -128,7 +128,7 @@ jobs: build_and_deploy_contracts: name: Deploy contracts on feature environment - if: github.event_name == 'push' and github.ref_name == 'benjamin' + if: github.event_name == 'push' && github.ref_name == 'benjamin' needs: [run-tests] runs-on: ubuntu-20.04 steps: