-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(.github/workflows): add new fork.yml workflow for automatic chan…
…ges on fork remove(init.py): delete redundant init.py file
- Loading branch information
1 parent
6c55135
commit 6b46e8f
Showing
2 changed files
with
32 additions
and
39 deletions.
There are no files selected for viewing
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
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 |