fewer issues for build failures

This commit is contained in:
Jacob Heider 2023-03-30 17:26:54 -04:00 committed by Jacob Heider
parent 0437e4252c
commit 8667d58cf4
2 changed files with 33 additions and 17 deletions

View file

@ -1,7 +0,0 @@
---
title: "❌ {{env.PACKAGE}}"
assignees: jhheider
labels: build-failure
---
build logs: {{env.URL}}

View file

@ -17,17 +17,40 @@ jobs:
complain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
if: github.ref_name == 'main'
- uses: JasonEtco/create-an-issue@v2
if: github.ref_name == 'main'
- name: Find issue
uses: actions-cool/issues-helper@v3
id: find
with:
filename: ./.github/NEW_VERSION_ISSUE_TEMPLATE.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE: ${{ inputs.projects }} (${{ inputs.platform }})
URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
actions: 'find-issues'
token: ${{ secrets.GITHUB_TOKEN }}
issue-state: 'open'
title-includes: "❌ build issues: ${{ input.projects }}"
labels: 'build-failure'
- name: Create issue
uses: actions-cool/issues-helper@v3
id: create
if: ${{ steps.find.outputs.issues == '[]' }}
with:
actions: 'create-issue'
token: ${{ secrets.GITHUB_TOKEN }}
title: "❌ build issues: ${{ input.projects }}"
body: "Running log of build failures for ${{ input.projects }}"
labels: 'build-failure'
assignees: 'jhheider'
- name: Log comment
uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ steps.create.outputs.issue-number || fromJSON(steps.find.outputs.issues)[0].number }}
body: |
# Build failure
## ${{ input.projects }}
### ${{ inputs.platform }}
logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- uses: martialonline/workflow-status@v3
id: status