build: stop job if build is not needed (without error) (#188)

This commit is contained in:
dman776 2021-11-23 09:24:22 -06:00 committed by GitHub
parent 20d73eae31
commit c821b00abe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@ jobs:
- run:
name: Retrieve last build info and check
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c ' ~/needs2build.sh ${CIRCLE_PROJECT_USERNAME} ${CIRCLE_PROJECT_REPONAME} ${CIRCLE_BRANCH} ${CIRCLE_SHA1}'"
- run:
name: Check2build failure (build not needed)
when: on_fail
command: circleci-agent step halt
save_build_info:
machine:
enabled: true