Skip to content

Update _worker.js

Update _worker.js #23

name: Package Worker #The name of the workflow
on: # trigger event
workflow_dispatch: #Manual trigger
push: # Triggered when code is pushed to the repository
paths: # Specify the file path for the trigger condition
- '_worker.js' # Triggered when the _worker.js file changes
jobs: # Tasks in a workflow
package-and-commit: # mission name
runs-on: ubuntu-latest # Operating environment, here we use the latest version of Ubuntu
steps: # Task steps
- name: Checkout Repository # Step name, checkout code
uses: actions/checkout@v2 # Using the actions/checkout action
- name: Zip the worker file # Package the _worker.js file into worker.zip
run: zip worker.zip _worker.js # Use the zip command to package directly
- name: Commit and push the packaged file # Submit and push the packaged files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add worker.zip
git commit -m "Automatically package and commit worker.zip"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{github.repository}}.git
git push