Skip to content

.github/workflows/nightly.yml #28

.github/workflows/nightly.yml

.github/workflows/nightly.yml #28

Workflow file for this run

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
nightly:
runs-on: [self-hosted, linux, nix]
steps:
- name: checkout
uses: actions/checkout@v4
- name: update
run: ./update.sh
- name: push
uses: ad-m/github-push-action@master
with:
branch: main
- name: generate zulip message
run: |
{
echo 'MSG<<EOF'
echo "*Nightly update*"
nix shell nixpkgs#jq --command ./message.sh
echo EOF
} >> "$GITHUB_ENV"
env:
RUN: ${{ github.run_id }}
- name: zulip info message
uses: zulip/github-actions-zulip/send-message@v1
with:
api-key: ${{ secrets.ZULIP_API_KEY }}
email: [email protected]
organization-url: https://hacspec.zulipchat.com
to: 440084
type: stream
topic: ci
content: ${{ env.MSG }}
- name: zulip error message
if: ${{ failure() }}
uses: zulip/github-actions-zulip/send-message@v1
with:
api-key: ${{ secrets.ZULIP_API_KEY }}
email: [email protected]
organization-url: https://hacspec.zulipchat.com
to: 440084
type: stream
topic: ci
content: "Unexpected Error: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"