diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml index 115ed732d90..50ecf84812f 100644 --- a/.github/workflows/precommit.yml +++ b/.github/workflows/precommit.yml @@ -84,7 +84,12 @@ jobs: - name: Deploy to precommit environment id: deploy - if: ${{ needs.build.outputs.total_additions > 100 && github.actor != 'dependabot[bot]' }} + if: ${{ always() }} + run: | + if [[ ${{ needs.build.outputs.total_additions }} -le 100 || "${{ github.actor }}" == "dependabot[bot]" ]]; then + echo "Skipping deployment" + exit 0 + fi uses: einaregilsson/beanstalk-deploy@v22 with: application_name: Webapp diff --git a/Jenkinsfile b/Jenkinsfile index 62abf64bf26..c17ab7f5b22 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -102,8 +102,10 @@ pipeline { return workflowRuns.any { run -> def result = checkWorkflowRun(run, commit_hash) if (run['conclusion'] == 'cancelled') { - error("GitHub Action was cancelled. Aborting Jenkins pipeline.") + echo("GitHub Action was cancelled. Ending Jenkins pipeline.") + return true } + return result } }