Skip to content

Commit

Permalink
add workflow that creates the zip file of the downloads folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nanjiangshu committed Oct 21, 2024
1 parent 7d6af3e commit 22afdb6
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/zip-downloads.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Zip Downloads Folder

# Trigger the workflow when there's a push to the ht24 branch, specifically for changes in the downloads folder
on:
push:
branches:
- ht24
paths:
- 'downloads/**' # Watch for changes in the downloads folder

jobs:
zip-folder:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Zip downloads folder
run: |
zip -r downloads.zip downloads
- name: Commit and push downloads.zip
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add downloads.zip
git commit -m "Auto update downloads.zip"
git push origin ht24
env:
# Necessary for pushing changes back to the repository
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 22afdb6

Please sign in to comment.