change notification to ntfy
All checks were successful
build-zig-0.9-amd64-host

This commit is contained in:
Emil Lerch 2023-02-26 12:04:22 -08:00
parent a3b0ee9156
commit 72e369f1a2
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -19,7 +19,7 @@ jobs:
# #
# However, arm64/linux isn't quite fully tier 1 yet, so this is more of a # However, arm64/linux isn't quite fully tier 1 yet, so this is more of a
# TODO: https://github.com/ziglang/zig/issues/2443 # TODO: https://github.com/ziglang/zig/issues/2443
- run: wget https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz - run: wget -q https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz
- run: tar x -C /usr/local -f zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz - run: tar x -C /usr/local -f zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz
- run: ln -s /usr/local/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig - run: ln -s /usr/local/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig
- run: apt update && apt install --no-install-recommends git - run: apt update && apt install --no-install-recommends git
@ -32,11 +32,20 @@ jobs:
- run: zig build -Dtarget=riscv64-linux - run: zig build -Dtarget=riscv64-linux
- run: zig build -Dtarget=x86_64-macos - run: zig build -Dtarget=x86_64-macos
- run: zig build -Dtarget=aarch64-macos - run: zig build -Dtarget=aarch64-macos
- name: Notification - name: Success Notification
if: always() if: success()
uses: https://github.com/elerch/Matrix-Message@v0.0.4 run: |
with: curl -u '${{ secrets.NTFY_USER }}:${{ secrets.NTFY_PASSWORD }}' \
room_id: ${{ secrets.MATRIX_ROOM_ID }} -H 'Title: Job Succeeded. ${{ github.repository }}/${{ github.ref }}' \
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} -H "Tags: +1" \
message: "Job ${{ job.status }}. ${{ github.repository }}/${{ github.ref }}" -d 'Job succeeded. See '$GITHUB_SERVER_URL'/${{ github.repository }}/actions/runs/${{ github.run_number }} for details' \
server: "${{ secrets.MATRIX_HOME_SERVER }}" '${{ secrets.NTFY_HOST }}${{ secrets.NTFY_TOPIC }}'
- name: Failure Notification
if: failure()
run: |
curl -u '${{ secrets.NTFY_USER }}:${{ secrets.NTFY_PASSWORD }}' \
-H "Priority: high" \
-H 'Title: Job FAILED. ${{ github.repository }}/${{ github.ref }}' \
-H "Tags: warning" \
-d 'Job failed. See '$GITHUB_SERVER_URL'/${{ github.repository }}/actions/runs/${{ github.run_number }} for details' \
'${{ secrets.NTFY_HOST }}${{ secrets.NTFY_TOPIC }}'