.github/workflows/nightly.yml #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |