From afc817d5d651acec6a5818d01951c385c05c1e26 Mon Sep 17 00:00:00 2001 From: Michael Balsillie Date: Mon, 22 Aug 2022 12:34:35 +1200 Subject: [PATCH] when conditions for all steps --- .woodpecker.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 91b7e56..45ee3be 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -40,6 +40,9 @@ pipeline: -f $${DOCKERFILE} $${CONTEXT} - docker push -a $REGISTRY/$${CI_REPO} + when: + event: tag + tag: v* notify-matrix-success: image: code.balsillie.net/containers/woodpecker-util @@ -56,18 +59,17 @@ pipeline: when: status: [ success ] - # notify-matrix-failure: - # image: code.balsillie.net/containers/woodpecker-util - # pull: false - # when: - # - status: - # - failure - # environment: - # *vars - # secrets: - # - source: MATRIX_ACCESS_TOKEN - # target: MATRIX_ACCESS_TOKEN - # commands: - # - shoutrrr send - # --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM} - # --message "New image build of $${CI_REPO}, $${CI_COMMIT_TAG}, has failed." \ No newline at end of file + notify-matrix-failure: + image: code.balsillie.net/containers/woodpecker-util + pull: false + environment: + *vars + secrets: + - source: MATRIX_ACCESS_TOKEN + target: MATRIX_ACCESS_TOKEN + commands: + - shoutrrr send + --url matrix://$${MATRIX_ACCESS_TOKEN}@$${MATRIX_HOST}:$${MATRIX_PORT}/?rooms=$${MATRIX_ROOM} + --message "New image build of $${CI_REPO}, $${CI_COMMIT_TAG}, has failed." + when: + status: [ failure ] \ No newline at end of file