2023-04-09 15:26:48 +03:00
|
|
|
name: tea/pantry/complain
|
|
|
|
description: creates an issue for failure conditions
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
projects:
|
|
|
|
description: projects to complain about
|
|
|
|
required: true
|
|
|
|
platform:
|
|
|
|
description: platform key
|
|
|
|
required: true
|
|
|
|
token:
|
2023-08-16 01:00:40 +03:00
|
|
|
description: github token
|
2023-04-09 15:26:48 +03:00
|
|
|
required: true
|
|
|
|
default: ${{ github.token }}
|
2023-08-16 01:00:40 +03:00
|
|
|
# slack-webhook:
|
|
|
|
# description: slack webhook
|
|
|
|
# required: false
|
|
|
|
# slack-channel:
|
|
|
|
# description: slack channel
|
|
|
|
# required: false
|
2023-04-09 15:26:48 +03:00
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: Find Issue
|
|
|
|
uses: actions-cool/issues-helper@v3
|
|
|
|
id: find
|
|
|
|
with:
|
|
|
|
actions: 'find-issues'
|
|
|
|
token: ${{ inputs.token }}
|
|
|
|
issue-state: 'open'
|
|
|
|
title-includes: "❌ build issues: ${{ inputs.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: ${{ inputs.token }}
|
|
|
|
title: "❌ build issues: ${{ inputs.projects }}"
|
|
|
|
body: "Running log of build failures for ${{ inputs.projects }}"
|
|
|
|
labels: 'build-failure'
|
|
|
|
assignees: 'jhheider'
|
|
|
|
|
|
|
|
- name: Log Comment
|
|
|
|
uses: actions-cool/issues-helper@v3
|
|
|
|
with:
|
|
|
|
actions: 'create-comment'
|
|
|
|
token: ${{ inputs.token }}
|
|
|
|
issue-number: ${{ steps.create.outputs.issue-number || fromJSON(steps.find.outputs.issues)[0].number }}
|
|
|
|
body: |
|
|
|
|
# Build failure
|
|
|
|
## ${{ inputs.projects }}
|
|
|
|
### ${{ inputs.platform }}
|
|
|
|
|
|
|
|
logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
|
|
|
2023-08-16 01:00:40 +03:00
|
|
|
# - uses: martialonline/workflow-status@v3
|
|
|
|
# id: status
|
2023-04-09 15:26:48 +03:00
|
|
|
|
2023-08-16 01:00:40 +03:00
|
|
|
# - uses: rtCamp/action-slack-notify@v2
|
|
|
|
# if: ${{ inputs.slack-webhook != '' }}
|
|
|
|
# env:
|
|
|
|
# SLACK_WEBHOOK: ${{ inputs.slack-webhook }}
|
|
|
|
# SLACK_CHANNEL: ${{ inputs.slack-channel }}
|
|
|
|
# SLACK_MESSAGE: new-version:${{ inputs.projects }} (${{ inputs.platform }}) ${{ steps.status.outputs.status }}
|
|
|
|
# SLACK_COLOR: ${{ steps.status.outputs.status }}
|