diff --git a/.github/issue_template_failed_ci_downstream.md b/.github/issue_template_failed_ci_downstream.md new file mode 100644 index 0000000..db6633b --- /dev/null +++ b/.github/issue_template_failed_ci_downstream.md @@ -0,0 +1,7 @@ +--- +title: CI build job {{ env.ACTION_NAME }} failed on downstream workspace +labels: CI +--- +An automated scheduled build failed on `{{ env.REF }}`: {{ env.URL }} while building or testing the +downstream workspace. This could be the result of a change in this repo breaking things downstream +or an error caused because of downstream changes. diff --git a/.github/workflows/reusable-industrial-ci-with-cache.yml b/.github/workflows/reusable-industrial-ci-with-cache.yml index bbc2d19..5f146a6 100644 --- a/.github/workflows/reusable-industrial-ci-with-cache.yml +++ b/.github/workflows/reusable-industrial-ci-with-cache.yml @@ -100,12 +100,28 @@ jobs: 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 + - name: Download issue template for target failure # 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 + - name: Download issue template for downstream failure # 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_downstream.md -O .github/issue_template_failed_ci_downstream.md + - uses: JasonEtco/create-an-issue@v2 + # `make` and so `colcon build` returns 2 on errors, while `colcon test-result` returns 1 on + # when any test failed. + if: ${{ always() && (steps.ici.outputs.build_target_workspace == '2' || steps.ici.outputs.target_test_results == '1') && 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 + - uses: JasonEtco/create-an-issue@v2 + if: ${{ always() && (steps.ici.outputs.build_downstream_workspace == '2' || steps.ici.outputs.downstream_test_results == '1') && github.event_name == 'schedule'}} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ACTION_NAME: ${{ inputs.ros_distro }}/${{ inputs.ros_repo }} @@ -113,7 +129,7 @@ jobs: URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} with: update_existing: true - filename: .github/issue_template_failed_ci.md + filename: .github/issue_template_failed_ci_downstream.md - name: prepare target_ws for cache if: ${{ always() && ! matrix.env.CCOV }} run: |