跳到主要内容

github action示例

name: issue_comment
# on:
# issue_comment:
# types: [created]
on:
issues:
#新建issue
types: [opened]
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3




- name: Install deno
uses: denolib/setup-deno@master





- name: Run cli
run: |
#!/bin/bash

sudo apt install p7zip-full

# echo ${{ github.event.comment.title }}
# echo ${{ github.event.comment.body }}

# echo ${{ github.event.issue.title }}
# echo ${{ github.event.issue.body }}

title='${{ github.event.issue.title }}'
body='${{ github.event.issue.body }}'
echo $title
echo $body
command=${body#*#}
filesDir=${body%#*}
echo $command
echo $filesDir

#执行指令
eval $command



# mkdir -p build

# deno task start osfetch -i bsb11122602 -s 4 -e 10

7z a -t7z -r ${title}.7z ./${filesDir}/
#command="osFiles#deno task start osfetch -i bsb11166263 -s 1000 -e 1714"
#截取目录
# echo ${command%#*}
#截取指令
# echo ${command#*#}



deno task uploadFiles filebig -f ${title}.7z