Skip to content

Commit

Permalink
Create zip_flows.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ansoncloud8 authored Aug 7, 2024
1 parent d2bbf38 commit 6493faf
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/zip_flows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: zip_flows # 工作流程的名称

on:
workflow_dispatch: # 手动触发
push:
paths:
- '_worker.js' # 当 _worker.js 文件发生变动时触发

permissions:
contents: write

jobs:
package-and-commit:
runs-on: ubuntu-latest # 运行环境,这里使用最新版本的 Ubuntu
steps:
- name: Checkout Repository # 检出代码
uses: actions/checkout@v2

- name: Zip the worker file # 将 _worker.js 文件打包成 worker.js.zip
run: zip _worker.js.zip _worker.js

- name: Commit and push the packaged file # 提交并推送打包后的文件
uses: EndBug/add-and-commit@v7
with:
add: '_worker.js.zip'
message: 'Automatically package and commit _worker.js.zip'
author_name: github-actions[bot]
author_email: actions[bot]@users.noreply.github.com
token: ${{ secrets.GH_TOKEN }}

0 comments on commit 6493faf

Please sign in to comment.