mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-26 21:05:04 +08:00
📦 docs: 资源商店新增发布资源功能
This commit is contained in:
parent
09e00652c3
commit
dc8ad30b84
51
.github/workflows/issue_handler.yml
vendored
Normal file
51
.github/workflows/issue_handler.yml
vendored
Normal file
@ -0,0 +1,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
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||||
|
REPOSITORY: ${{ github.repository }}
|
||||||
|
ACT_TYPE: ${{ github.event.action }}
|
Loading…
Reference in New Issue
Block a user