File tree Expand file tree Collapse file tree 1 file changed +27
-17
lines changed Expand file tree Collapse file tree 1 file changed +27
-17
lines changed Original file line number Diff line number Diff line change 1- # inspired by: https://github.com/orgs/community/discussions/22183#discussioncomment-6321583
1+ # inspired by:
2+ # https://github.com/JetBrains/intellij-platform-plugin-template/blob/main/.github/workflows/template-cleanup.yml
23
34name : Template Cleanup
4- run-name : template-cleanup
5-
65on :
7- create :
6+ push :
7+ branches : [main]
88
99jobs :
10+
11+ # Run a cleaning process only if the workflow is triggered by the non-"toolbox-workshop-protocol-template" repository.
1012 template-cleanup :
11- name : template-cleanup
13+ name : Template Cleanup
1214 runs-on : ubuntu-latest
13-
15+ if : github.event.repository.name != 'toolbox-workshop-protocol-template'
1416 permissions :
1517 contents : write
16-
1718 steps :
18- - uses : actions/checkout@v3
19-
19+
20+ # Check out the current repository
21+ - name : Fetch Sources
22+ uses : actions/checkout@v4
23+
2024 # Cleanup project
2125 - name : Cleanup
2226 run : |
23- mv README.md notes.md
27+ mv README.md notes.md
2428 rm -rf .github
2529 rm -f environment.yml
2630 touch README.md
@@ -29,11 +33,17 @@ jobs:
2933 echo "Generated from [toolbox-workshop-protocol-template](https://github.com/pep-dortmund/toolbox-workshop-protocol-template)" >> README.md
3034 echo "Find more information in [notes.md](notes.md)." >> README.md
3135
32- # save changed files
33- - name : Commit changed files
34- uses : stefanzweifel/git-auto-commit-action@v4
35- with :
36- commit_message : " Setup repo"
36+ # Commit modified files
37+ - name : Commit files
38+ run : |
39+ git config --local user.email "[email protected] " 40+ git config --local user.name "GitHub Action"
41+ git add .
42+ git commit -m "Template cleanup"
3743
38- env :
39- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44+ # Push changes
45+ - name : Push changes
46+ uses : ad-m/github-push-action@master
47+ with :
48+ branch : main
49+ github_token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments