aliyun-boce-export #2360
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: aliyun-boce-export | |
on: | |
schedule: | |
# 每两个小时运行一次 | |
- cron: '0 */2 * * *' | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: npm install puppeteer | |
- name: Run script to download file | |
run: node download.js | |
- name: Commit and push changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "FmgX" | |
ls downloads # 列出下载目录中的文件以验证文件是否存在 | |
#如果需要则需要修改这个github.com-ping-result.xlsx,前面的就是自己填入的域名 | |
git add downloads/github.com-ping-result.xlsx | |
git commit -m "Add downloaded file" | |
git push -f | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |