From 8826588b643b3012d11b10224a46b8b4cfcc8146 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Tue, 24 Jan 2023 17:21:32 -0500 Subject: [PATCH] create issue from failed runs --- .github/ISSUE_TEMPLATE.md | 7 +++++++ .github/workflows/new-version.yml | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..1b2a0f96 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,7 @@ +--- +title: "new release: {{env.PACKAGE}} failed" +assignees: jhheider +labels: bug +--- +A new-version run for the {{env.PACKAGE}} release. Review the failure +here and mitigate. diff --git a/.github/workflows/new-version.yml b/.github/workflows/new-version.yml index b6614702..c508893f 100644 --- a/.github/workflows/new-version.yml +++ b/.github/workflows/new-version.yml @@ -8,6 +8,10 @@ on: required: true type: string +permissions: + contents: read + issues: write + jobs: build: uses: ./.github/workflows/build.yml @@ -35,3 +39,11 @@ jobs: SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} SLACK_MESSAGE: new-version:${{ inputs.projects }} ${{ steps.status.outputs.status }} SLACK_COLOR: ${{ steps.status.outputs.status }} + - uses: actions/checkout@v3 + if: ${{ steps.status.outputs.status == 'failure' }} + - uses: JasonEtco/create-an-issue@v2 + if: ${{ steps.status.outputs.status == 'failure' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACKAGE: ${{ inputs.projects }} + URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \ No newline at end of file