From dc8ad30b84a0f1a4ccaa4a8a02b30351a062dc9e Mon Sep 17 00:00:00 2001 From: snowykami Date: Tue, 17 Sep 2024 14:42:22 +0800 Subject: [PATCH] =?UTF-8?q?:package:=20docs:=20=E8=B5=84=E6=BA=90=E5=95=86?= =?UTF-8?q?=E5=BA=97=E6=96=B0=E5=A2=9E=E5=8F=91=E5=B8=83=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issue_handler.yml | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/issue_handler.yml diff --git a/.github/workflows/issue_handler.yml b/.github/workflows/issue_handler.yml new file mode 100644 index 00000000..4f9f4c0f --- /dev/null +++ b/.github/workflows/issue_handler.yml @@ -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 }} \ No newline at end of file