Skip to content

Commit

Permalink
feat(.github/workflows): add new fork.yml workflow for automatic chan…
Browse files Browse the repository at this point in the history
…ges on fork

remove(init.py): delete redundant init.py file
  • Loading branch information
ToasterUwU committed Sep 25, 2023
1 parent 6c55135 commit 6b46e8f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 39 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Adjust new Fork to be not a template anymore

on:
fork: # Trigger when the repository is forked

jobs:
auto_commit:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Make changes
run: |
sed -i 's/Base Bot/${{ github.event.repository.name }} - Discord Bot/g' bot_setup.iss
sed -i 's/%APP_ID%/$(uuidgen)/g' bot_setup.iss
- name: Check for changes
run: |
if git diff-index --quiet HEAD --; then
echo "No changes to commit."
exit 0
fi
- name: Commit and push
run: |
git config --global user.name "${{ github.event.repository.owner.login }}"
git config --global user.email "${{ github.event.repository.owner.email }}"
git add .
git commit -m "Automatic changes on fork"
git push origin HEAD:main
39 changes: 0 additions & 39 deletions init.py

This file was deleted.

0 comments on commit 6b46e8f

Please sign in to comment.