Skip to content

Add files via upload #2

Add files via upload

Add files via upload #2

Workflow file for this run

name: Unpack ZIP to repo
on:
push:
branches: [ "main" ]
paths:
- "*.zip"
permissions:
contents: write
jobs:
unpack:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Find ZIP
run: |
set -e
ZIP=$(ls -1 *.zip | head -n1 || true)
if [ -z "$ZIP" ]; then
echo "No ZIP found in repo root"; exit 1
fi
echo "ZIP_NAME=$ZIP" >> $GITHUB_ENV
- name: Unzip into repo root
run: |
sudo apt-get update -y
sudo apt-get install -y unzip
unzip -o "$ZIP_NAME" -d .
rm -f "$ZIP_NAME"
- name: Commit unpacked files
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "chore: unpack ZIP via workflow"
git push
fi