Skip to content

Add serialize-workflow-action to manage concurrent workflows #770

Add serialize-workflow-action to manage concurrent workflows

Add serialize-workflow-action to manage concurrent workflows #770

name: The EARs Reviewing bot on comments
on:
issue_comment:
types: [created]
jobs:
new-comment:
if: github.actor != 'erga-ear-bot[bot]' && github.event.issue.pull_request && (contains(github.event.issue.labels.*.name, 'ERGA-BGE') || contains(github.event.issue.labels.*.name, 'ERGA-Pilot') || contains(github.event.issue.labels.*.name, 'ERGA-Community'))
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: 917566
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: "ERGA-consortium"
repositories: "EARs"
- name: Checkout
uses: actions/checkout@v4
with:
ref: "main"
token: ${{ steps.generate-token.outputs.token }}
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Run python script to assign reviewer
env:
GITHUB_APP_TOKEN: ${{ steps.generate-token.outputs.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.issue.number }}
COMMENT_TEXT: ${{ github.event.comment.body }}
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
run: |
python -m pip install --upgrade pip
python -m pip install -r ear_bot/requirements.txt
python -u ear_bot/ear_bot_reviewer.py --comment