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: with:
token: ${{ secrets.MATRIX_TOKEN }} token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }} 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" - name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }} if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4 uses: calamares/actions/matrix-notify@v4
with: with:
token: ${{ secrets.MATRIX_TOKEN }} token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }} 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" - name: "build"
id: build id: build
uses: calamares/actions/generic-build@v4 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" - name: "Calamares: archive"
working-directory: ${{ env.BUILDDIR }} working-directory: ${{ env.BUILDDIR }}
run: | run: |
@ -39,18 +55,4 @@ jobs:
name: calamares-tarball name: calamares-tarball
path: ${{ env.BUILDDIR }}/calamares.tar.gz path: ${{ env.BUILDDIR }}/calamares.tar.gz
if-no-files-found: error if-no-files-found: error
retention-days: 3 retention-days: 7
- 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 }}"

View File

@ -35,11 +35,12 @@ jobs:
token: ${{ secrets.MATRIX_TOKEN }} token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }} room: ${{ secrets.MATRIX_ROOM }}
message: | 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" - name: "notify: fail"
if: ${{ failure() && github.repository == 'calamares/calamares' }} if: ${{ failure() && github.repository == 'calamares/calamares' }}
uses: calamares/actions/matrix-notify@v4 uses: calamares/actions/matrix-notify@v4
with: with:
token: ${{ secrets.MATRIX_TOKEN }} token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }} 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 }}