Skip to content

Commit

Permalink
Automatically create an Issue on failed scheduled builds (#21)
Browse files Browse the repository at this point in the history
* Create an issue on failing ICI

* Run on schedules only

* Use correct upstream path for template

Co-authored-by: Felix Exner (fexner) <[email protected]>

---------

Co-authored-by: Christoph Fröhlich <[email protected]>
  • Loading branch information
fmauch and christophfroehlich authored Mar 1, 2024
1 parent 83e9649 commit 13ef1f4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/issue_template_failed_ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: CI build job {{ env.ACTION_NAME }} failed!
labels: CI
---
An automated scheduled build failed on `{{ env.REF }}`: {{ env.URL }}
15 changes: 15 additions & 0 deletions .github/workflows/reusable-industrial-ci-with-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,21 @@ jobs:
ROS_REPO: ${{ inputs.ros_repo }}
OS_CODE_NAME: ${{ inputs.os_code_name }}
BEFORE_INSTALL_UPSTREAM_DEPENDENCIES: ${{ inputs.before_install_upstream_dependencies }}
id: ici
- name: Download issue template # Has to be a local file
if: ${{ always() && steps.ici.outcome == 'failure' && github.event_name == 'schedule' }}
run:
wget https://raw.githubusercontent.com/ros-controls/ros2_control_ci/master/.github/issue_template_failed_ci.md -O .github/issue_template_failed_ci.md
- uses: JasonEtco/create-an-issue@v2
if: ${{ always() && steps.ici.outcome == 'failure' && github.event_name == 'schedule' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTION_NAME: ${{ inputs.ros_distro }}/${{ inputs.ros_repo }}
REF: ${{ inputs.ref_for_scheduled_build }}
URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/issue_template_failed_ci.md
- name: prepare target_ws for cache
if: ${{ always() && ! matrix.env.CCOV }}
run: |
Expand Down

0 comments on commit 13ef1f4

Please sign in to comment.