Skip to content

Extract ZIP Archives #2

Extract ZIP Archives

Extract ZIP Archives #2

Workflow file for this run

name: Extract ZIP Archives
on:
push:
branches: [main, master]
paths:
- '**.zip'
workflow_dispatch:
permissions:
contents: write
jobs:
extract:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Extract ZIP files to root and delete
run: |
find . -name "*.zip" -type f -not -path "./.git/*" | while read -r zipfile; do
echo "Extracting: $zipfile"
unzip -o "$zipfile" -d .
rm "$zipfile"
echo "Deleted: $zipfile"
done
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if ! git diff --cached --quiet; then
git commit -m "chore: extract zip archives [skip ci]"
git push
fi