Release notification added

This commit is contained in:
Peter Grlica
2022-11-29 15:59:26 +01:00
parent e02d2e7afc
commit 492b4927cb
2 changed files with 27 additions and 18 deletions
-17
View File
@@ -52,7 +52,6 @@ jobs:
> ${{ github.event.comment.body }}
#########################################################################################################
# only for PR actions
- name: Pull Request created, edited or deleted
@@ -81,19 +80,3 @@ jobs:
**${{ github.triggering_actor }}** ${{ github.event.action }} a PR review **[#${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }} ](${{ github.event.pull_request._links.html.href }})** in ${{ github.event.repository.name }}:
> ${{ github.event.pull_request.body }}
#########################################################################################################
# only for releases
# - name: Send message on release
# if: github.event_name == 'release'
# id: matrix-chat-release
# uses: fadenb/matrix-chat-message@v0.0.6
# with:
# homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
# token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
# channel: ${{ secrets.MATRIX_ROOM_ID }}
# message: |
# ### [ ${{ github.event.repository.name }} ]
# A release **${{ github.event.release.tag_name }}** has been **${{ github.event.action }}** by ${{ github.event.release.author.login }}\
# More info [here](${{ github.event.release.html_url }})
+27 -1
View File
@@ -392,7 +392,7 @@ jobs:
########################################################################################################################
docker-imags:
docker-images:
name: "Docker image ${{ matrix.image }}"
runs-on: ubuntu-latest
@@ -454,3 +454,29 @@ jobs:
docker push \
${{ matrix.image }}:${{ env.DOCKER_IMAGE_ALIAS }}
notify:
name: "Send matrix release notification"
runs-on: ubuntu-latest
needs: [ docker-images, release ]
steps:
- name: "Send message via Matrix on successful release"
if: ${{ !env.ACT }}
id: matrix-chat-release
uses: fadenb/matrix-chat-message@v0.0.6
with:
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
channel: ${{ secrets.MATRIX_ROOM_ID }}
message: |
Corteza **${{ env.DOCKER_IMAGE_TAG }}** has been successfully released 🎉🎉
- name: "Send message via Matrix on failed release"
if: ${{ !env.ACT && failure() }}
id: matrix-chat-release
uses: fadenb/matrix-chat-message@v0.0.6
with:
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
channel: ${{ secrets.MATRIX_ROOM_ID }}
message: |
Corteza **${{ env.DOCKER_IMAGE_TAG }}** release has failed