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: complain:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - name: Find issue
if: github.ref_name == 'main' uses: actions-cool/issues-helper@v3
id: find
- uses: JasonEtco/create-an-issue@v2
if: github.ref_name == 'main'
with: with:
filename: ./.github/NEW_VERSION_ISSUE_TEMPLATE.md actions: 'find-issues'
env: token: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} issue-state: 'open'
PACKAGE: ${{ inputs.projects }} (${{ inputs.platform }}) title-includes: "❌ build issues: ${{ input.projects }}"
URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} 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 - uses: martialonline/workflow-status@v3
id: status id: status