labels:
  backend: local

steps:
- name: nix flake check
  image: bash
  commands:
  - nix flake check

- name: notify
  image: bash
  environment:
    ADDRESS:
      from_secret: matrix_homeserver
    ROOM:
      from_secret: matrix_roomid
    USER:
      from_secret: matrix_username
    PASS:
      from_secret: matrix_password
  commands:
  - nix run '.#matrix-notifier'
  when:
    status:
    - failure
    - success