-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from zyang91/zyang91-patch-1
Create cleanup.yml
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 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,37 @@ | ||
name: Clean Up | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- '**' # Apply to all branches | ||
pull_request: | ||
branches: | ||
- main | ||
- '**' | ||
|
||
jobs: | ||
remove-dsstore: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure Git user | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "zyang91" | ||
- name: Find and remove .DS_Store files | ||
run: | | ||
git rm --cached $(git ls-files | grep .DS_Store) || echo "No .DS_Store files found" | ||
git commit -m "Remove .DS_Store files" || echo "No changes to commit" | ||
- name: Find and remove .Rhistory files | ||
run: | | ||
git rm --cached $(git ls-files | grep .Rhistory) || echo "No .Rhistory files found" | ||
git commit -m "Remove .Rhistory files" || echo "No changes to commit" | ||
- name: Push changes to repository | ||
run: | | ||
git push origin HEAD || echo "No changes pushed" |