From db62325e18a6ae7fcef25f0f1a1b43c83c9ba9d3 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Thu, 25 May 2023 10:25:34 +0200 Subject: [PATCH] tools: open issue when update workflow fails PR-URL: https://github.com/nodejs/node/pull/48018 Refs: https://github.com/nodejs/security-wg/issues/973 Reviewed-By: Richard Lau --- .github/FAILED_DEP_UPDATE_ISSUE_TEMPLATE.md | 7 +++++++ .github/workflows/tools.yml | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 .github/FAILED_DEP_UPDATE_ISSUE_TEMPLATE.md diff --git a/.github/FAILED_DEP_UPDATE_ISSUE_TEMPLATE.md b/.github/FAILED_DEP_UPDATE_ISSUE_TEMPLATE.md new file mode 100644 index 00000000000000..c1f35e66ed48fe --- /dev/null +++ b/.github/FAILED_DEP_UPDATE_ISSUE_TEMPLATE.md @@ -0,0 +1,7 @@ +--- +title: 'deps: update {{ env.FAILED_DEP }} job failed' +labels: dependencies +--- +This is an automatically generated issue by the {{ tools.context.action }} GitHub Action. +The update [workflow]({{ env.JOB_URL }}) has failed for {{ tools.context.workflow }}. +@nodejs/security-wg @nodejs/actions \ No newline at end of file diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index ee596784db20f3..eea4c81c9feb0c 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -296,3 +296,14 @@ jobs: labels: ${{ matrix.label }} title: '${{ matrix.subsystem }}: update ${{ matrix.id }} to ${{ env.NEW_VERSION }}' update-pull-request-title-and-body: true + - name: Open issue on fail + id: create-issue + if: github.event_name == 'schedule' && ${{ failure() }} + uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd # 2.9.1 + env: + GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} + FAILED_DEP: ${{ matrix.id }} + JOB_URL: ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }} + with: + filename: .github/FAILED_DEP_UPDATE_ISSUE_TEMPLATE.md + update_existing: true