Skip to content

Commit b2d2c10

Browse files
committed
CI: automatically open an issue if nightly build fails
1 parent ea0002d commit b2d2c10

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,3 +672,23 @@ jobs:
672672
- name: Publish Dotty SBT Plugin Release
673673
run: |
674674
./project/scripts/sbtPublish ";project sbt-dotty ;publishSigned ;sonatypeBundleRelease"
675+
676+
open_issue_on_failure:
677+
runs-on: [self-hosted, Linux]
678+
container:
679+
image: lampepfl/dotty:2021-03-22
680+
needs: [nightly_documentation, test_windows_full]
681+
# The `failure()` expression is true iff at least one of the dependencies
682+
# of this job (including transitive dependencies) has failed.
683+
if: "failure() && github.event_name == 'schedule'"
684+
steps:
685+
- name: Checkout issue template
686+
uses: actions/checkout@v2
687+
688+
- name: Open an issue
689+
uses: JasonEtco/create-an-issue@v2
690+
env:
691+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
692+
WORKFLOW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
693+
with:
694+
filename: .github/workflows/issue_nightly_failed.md
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Nightly {{ workflow }} workflow of {{ date | date('YYYY-MM-DD') }} failed
3+
labels: area:infrastructure
4+
---
5+
See {{ env.WORKFLOW_RUN_URL }}

0 commit comments

Comments
 (0)