-
Notifications
You must be signed in to change notification settings - Fork 22
51 lines (44 loc) · 1.52 KB
/
issue_handler.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Issue Handler
on:
issues:
types: [ opened, edited, closed, reopened ]
concurrency:
group: issue_handler
cancel-in-progress: false
jobs:
check-issue:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check issue title
id: check_title
run: |
ISSUE_TITLE="${{ github.event.issue.title }}"
if [[ "$ISSUE_TITLE" == Plugin:* || "$ISSUE_TITLE" == Resource:* ]]; then
echo "Title starts with Plugin: or Resource:."
echo "::set-output name=title_match::true"
else
echo "Title does not start with Plugin: or Resource:."
echo "::set-output name=title_match::false"
fi
- name: Set up Python
uses: actions/setup-python@v2
if: steps.check_title.outputs.title_match == 'true'
with:
python-version: '3.12'
- name: Install dependencies
if: steps.check_title.outputs.title_match == 'true'
run: |
echo "Installing dependencies."
pip install -r liteyuki_flow/requirements.txt
- name: Run Plugin/Resource issue handler
if: steps.check_title.outputs.title_match == 'true'
run: |
echo "Running Plugin/Resource issue handler."
python -m liteyuki_flow --handle
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
REPOSITORY: ${{ github.repository }}
ACT_TYPE: ${{ github.event.action }}