Skip to content

Plate bending earthquakes and the strength distribution of the lithosphere #57

Plate bending earthquakes and the strength distribution of the lithosphere

Plate bending earthquakes and the strength distribution of the lithosphere #57

Workflow file for this run

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: m-te-bot[bot]
body-regex: '(Model Report|New Model Submitted)'
direction: last
# Create m@te-bot token
- name: create token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
# generate report
- name: generate report
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
COMMENT_ID: ${{ steps.fc.outputs.comment-id }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.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:
token: ${{ steps.app-token.outputs.token }}
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: ${{ steps.app-token.outputs.token }}
labels: workflow_error