diff --git a/.woodpecker.yml b/.woodpecker.yml index 65b5f15..e1097e1 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,6 +9,9 @@ variables: - DOCKERFILE=docker/Dockerfile - CONTEXT=. - WATCHTOWER_HOST=watchtower.balsillie.net + - MATRIX_HOST=matrix.balsillie.net + - MATRIX_PORT=443 + - MATRIX_ROOM=!HdSXmuHcBMaYExEfkh:balsillie.net workspace: base: /git @@ -45,13 +48,7 @@ pipeline: volumes: - /var/run/docker.sock:/var/run/docker.sock environment: - - REGISTRY=code.balsillie.net - - REGISTRY_USER=michael - - ORGANIZATION=containers - - REPO=matrix-service-synapse - - BUILD_ARGS=PYTHON_VERSION=3.10 - - DOCKERFILE=docker/Dockerfile - - CONTEXT=. + *vars commands: - export DOCKER_BUILDKIT=1 - cd /git/$${REPO} @@ -68,7 +65,7 @@ pipeline: $${CONTEXT} - docker push -a $REGISTRY/$ORGANIZATION/$REPO - notify-watchtower: + trigger-watchtower: image: curlimages/curl pull: false environment: @@ -77,4 +74,17 @@ pipeline: - source: WATCHTOWER_HTTP_API_TOKEN target: WATCHTOWER_HTTP_API_TOKEN commands: - - /bin/sh /git/pipeline/notify-watchtower.sh \ No newline at end of file + - /bin/sh /git/pipeline/trigger-watchtower.sh + + notify-matrix: + image: containrrr/shoutrrr + 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 $${ORGANIZATION}/$${REPO} has completed and been deployed." \ No newline at end of file diff --git a/notify-watchtower.sh b/trigger-watchtower.sh similarity index 100% rename from notify-watchtower.sh rename to trigger-watchtower.sh