From 1021db053debdd6b8ab5cd9724d9435a455726f1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 28 May 2021 12:55:52 +0200 Subject: [PATCH] CI: switch to shared Calamares actions entirely --- .github/actions/notify-push/action.yml | 20 -------------------- .github/workflows/issues.yml | 4 ++-- .github/workflows/nightly-debian.yml | 4 ++-- .github/workflows/nightly-neon.yml | 4 ++-- .github/workflows/nightly-opensuse.yml | 4 ++-- .github/workflows/push.yml | 4 ++-- 6 files changed, 10 insertions(+), 30 deletions(-) delete mode 100644 .github/actions/notify-push/action.yml diff --git a/.github/actions/notify-push/action.yml b/.github/actions/notify-push/action.yml deleted file mode 100644 index 80c89ea76..000000000 --- a/.github/actions/notify-push/action.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: 'Notify on Push' -description: 'Notify Matrix room' - -inputs: - room: - description: 'Matrix Room ID' - required: true - token: - description: 'Matrix Token' - required: true - message: - description: 'Message to send' - required: true - -runs: - using: "composite" - steps: - - shell: bash - run: | - curl -s -XPOST -d "$( echo "${{ inputs.message }}" | jq -Rsc '{"msgtype": "m.text", "body":@text}' )" "https://matrix.org/_matrix/client/r0/rooms/%21${{ inputs.room }}/send/m.room.message?access_token=${{ inputs.token }}" > /dev/null diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index a321d40ba..7d1d5a9f0 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -10,14 +10,14 @@ jobs: steps: - name: "notify: new" if: github.event.issue.state == 'open' - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} message: "OPENED ${{ github.event.issue.html_url }} by ${{ github.actor }} ${{ github.event.issue.title }}" - name: "notify: closed" if: github.event.issue.state != 'open' - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} diff --git a/.github/workflows/nightly-debian.yml b/.github/workflows/nightly-debian.yml index 53ff93019..7b56c8f76 100644 --- a/.github/workflows/nightly-debian.yml +++ b/.github/workflows/nightly-debian.yml @@ -84,14 +84,14 @@ jobs: run: make install VERBOSE=1 - name: "notify: ok" if: ${{ success() && github.repository == 'calamares/calamares' }} - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}" - name: "notify: fail" if: ${{ failure() && github.repository == 'calamares/calamares' }} - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} diff --git a/.github/workflows/nightly-neon.yml b/.github/workflows/nightly-neon.yml index b5c5b8ced..05f23beb8 100644 --- a/.github/workflows/nightly-neon.yml +++ b/.github/workflows/nightly-neon.yml @@ -83,14 +83,14 @@ jobs: retention-days: 3 - name: "notify: ok" if: ${{ success() && github.repository == 'calamares/calamares' }} - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}" - name: "notify: fail" if: ${{ failure() && github.repository == 'calamares/calamares' }} - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} diff --git a/.github/workflows/nightly-opensuse.yml b/.github/workflows/nightly-opensuse.yml index 88c30d136..24987cc7c 100644 --- a/.github/workflows/nightly-opensuse.yml +++ b/.github/workflows/nightly-opensuse.yml @@ -82,14 +82,14 @@ jobs: run: make install VERBOSE=1 - name: "notify: ok" if: ${{ success() && github.repository == 'calamares/calamares' }} - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.pre_build.outputs.message }}" - name: "notify: fail" if: ${{ failure() && github.repository == 'calamares/calamares' }} - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c5f02c625..89fbf91b6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -79,7 +79,7 @@ jobs: run: make install VERBOSE=1 - name: "notify: ok" if: ${{ success() && github.repository == 'calamares/calamares' }} - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} @@ -88,7 +88,7 @@ jobs: .. ${{ steps.pre_build.outputs.message }} - name: "notify: fail" if: ${{ failure() && github.repository == 'calamares/calamares' }} - uses: ./.github/actions/notify-push + uses: calamares/actions/matrix-notify@v1 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }}