-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 1.01 KB
/
Copy pathpush.yml
File metadata and controls
39 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Create ZIP archives
on:
push:
branches:
- master
workflow_dispatch:
jobs:
recreate-zip:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure full history, needed for diffs
- name: Create zip archive from dirs
run: ./make-zip.sh
- name: Check if there are changes
run: |
if git diff --quiet; then
echo "No changes to commit"
echo "skip_commit=true" >> $GITHUB_ENV
else
echo "Changes detected"
echo "skip_commit=false" >> $GITHUB_ENV
fi
- name: Commit and push changes
if: env.skip_commit == 'false'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add *.zip
git commit -m "Autobuild zip files after push"
git push