-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow that creates the zip file of the downloads folder
- Loading branch information
1 parent
7d6af3e
commit 22afdb6
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
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 }} | ||
|