CI: make CI scripts more consistent

This commit is contained in:
Adriaan de Groot 2022-04-25 15:28:35 +02:00
parent cab4be1bd0
commit c48209a9dd
3 changed files with 24 additions and 19 deletions

View File

@ -34,11 +34,13 @@ jobs:
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
message: |
OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
- name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
message: |
FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}

View File

@ -28,6 +28,22 @@ jobs:
- name: "build"
id: build
uses: calamares/actions/generic-build@v4
- name: "notify: ok"
if: ${{ success() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: |
OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
- name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: |
FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
- name: "Calamares: archive"
working-directory: ${{ env.BUILDDIR }}
run: |
@ -39,18 +55,4 @@ jobs:
name: calamares-tarball
path: ${{ env.BUILDDIR }}/calamares.tar.gz
if-no-files-found: error
retention-days: 3
- name: "notify: ok"
if: ${{ success() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
- name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
retention-days: 7

View File

@ -35,11 +35,12 @@ jobs:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: |
OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
OK ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}
- name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4
with:
token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }}
message: "FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}"
message: |
FAIL ${{ github.workflow }} in ${{ github.repository }} ${{ steps.build.outputs.git-summary }}