diff --git a/.circleci/config.yml b/.circleci/config.yml index 910769b478..edaeb5d558 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -275,6 +275,13 @@ jobs: - checkout - attach_workspace: at: . + - run: + name: Only run when publish/deployed/*/deployment.json changes + command: | + changes=$(git diff --name-status origin/develop | grep 'publish\/deployed\/[a-z0-9\-]*\/deployment\.json$' || true) + if [ -z "$changes" ]; then + circleci-agent step halt + fi; - run: npm run test:deployments job-validate-etherscan: working_directory: ~/repo diff --git a/.circleci/src/jobs/job-validate-deployments.yml b/.circleci/src/jobs/job-validate-deployments.yml index e91c34b5a3..f50c3667e0 100644 --- a/.circleci/src/jobs/job-validate-deployments.yml +++ b/.circleci/src/jobs/job-validate-deployments.yml @@ -4,4 +4,11 @@ steps: - checkout - attach_workspace: at: . + - run: + name: Only run when publish/deployed/*/deployment.json changes + command: | + changes=$(git diff --name-status origin/develop | grep 'publish\/deployed\/[a-z0-9\-]*\/deployment\.json$' || true) + if [ -z "$changes" ]; then + circleci-agent step halt + fi; - run: npm run test:deployments