Edit Issue Trigger #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Edit Issue Trigger | |
on: | |
issues: | |
types: | |
- edited | |
jobs: | |
parseEditedIssue: | |
if: ${{ !github.event.issue.pull_request }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# setup python | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- run: pip install -r requirements.txt | |
# find issue comment | |
- name: find comment | |
uses: peter-evans/find-comment@v3 | |
id: fc | |
with: | |
issue-number: ${{ github.event.issue.number }} | |
comment-author: github-actions | |
body-includes: Model Report | |
direction: last | |
# generate report | |
- name: generate report | |
env: | |
ISSUE_NUMBER: ${{ github.event.issue.number }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
python3 .github/scripts/write_report.py | |
# steps if failure | |
- name: workflow url | |
if: failure() | |
id: workflow-url | |
run: | | |
echo "workflow_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT | |
- name: comment on failure | |
if: failure() | |
uses: GrantBirki/[email protected] | |
with: | |
issue-number: ${{ github.event.issue.number }} | |
file: .github/templates/parse-workflow-fail.md | |
vars: | | |
workflow_url: ${{ steps.workflow-url.outputs.workflow_url }} | |
- name: add fail label | |
if: failure() | |
uses: actions-ecosystem/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
labels: workflow_error | |