Skip to content

Commit cabdaae

Browse files
committed
Add run id and trigger on repo dispatch event
1 parent 62597c6 commit cabdaae

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/nightly.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
name: Nightly Builds
1616

1717
on:
18-
# Runs every day at 06:00 AM (PT) and 08:00 PM (PT) / 04:00 AM (UTC) and 02:00 PM (UTC)
18+
# Runs every day at 06:00 AM (PT) and 08:00 PM (PT) / 04:00 AM (UTC) and 02:00 PM (UTC) or on 'firebase_build' repository dispatch event.
1919
schedule:
2020
- cron: "0 4,14 * * *"
21+
repository_dispatch:
22+
types: [firebase_build]
2123

2224
jobs:
2325
nightly:
@@ -75,11 +77,11 @@ jobs:
7577
domain: ${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}
7678
from: 'GitHub <admin-github@${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}>'
7779
to: ${{ secrets.FIREBASE_ADMIN_GITHUB_EMAIL }}
78-
subject: '[${{github.repository}}] Nightly build failed!'
80+
subject: 'Nightly build ${{github.run_id}} of ${{github.repository}} failed!'
7981
html: >
80-
<b>Nightly workflow failed on: ${{github.repository}}</b>
82+
<b>Nightly workflow ${{github.run_id}} failed on: ${{github.repository}}</b>
8183
<br /><br />Navigate to the
82-
<a href="https://github.com/firebase/firebase-admin-node/actions">failed workflow</a>.
84+
<a href="https://github.com/firebase/firebase-admin-node/actions/runs/${{github.run_id}}">failed workflow</a>.
8385
continue-on-error: true
8486

8587
- name: Send email on cancelled
@@ -90,9 +92,9 @@ jobs:
9092
domain: ${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}
9193
from: 'GitHub <admin-github@${{ secrets.OSS_BOT_MAILGUN_DOMAIN }}>'
9294
to: ${{ secrets.FIREBASE_ADMIN_GITHUB_EMAIL }}
93-
subject: '[${{github.repository}}] Nightly build got cancelled!'
95+
subject: 'Nightly build ${{github.run_id}} of ${{github.repository}} cancelled!'
9496
html: >
95-
<b>Nightly workflow cancelled on: ${{github.repository}}</b>
97+
<b>Nightly workflow ${{github.run_id}} cancelled on: ${{github.repository}}</b>
9698
<br /><br />Navigate to the
97-
<a href="https://github.com/firebase/firebase-admin-node/actions">cancelled workflow</a>.
99+
<a href="https://github.com/firebase/firebase-admin-node/actions/runs/${{github.run_id}}">cancelled workflow</a>.
98100
continue-on-error: true

0 commit comments

Comments
 (0)