Zip generated by zip.sh on Thu Dec 26 20:37:38 UTC 2024 #26
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
# Filename: generate_and_commit.yml | |
# Developer: incpi | |
name: Generate and Commit Files | |
on: | |
push: # Trigger on push for any branch | |
branches: | |
- '**' # Match all branches | |
jobs: | |
generate_and_commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
# Generate files with the shell script | |
- name: Run Shell Script and Commit Generated Files | |
run: | | |
# Make the shell script executable and run it | |
chmod +x ./zip.sh | |
./zip.sh | |
# Configure Git | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "GitHub Action" | |
# Add all newly generated files to Git | |
git add bin/* | |
git add docs/* | |
git commit -m "Zip generated by zip.sh on $(date)" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prevent re-triggering the Workflow | |
if: contains(github.event.head_commit.message, 'Zip generated by zip.sh') | |
run: echo "Skipping because this is the automated commit message from our script." |