-
Notifications
You must be signed in to change notification settings - Fork 123
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 #52 from RuslanGlaznyov/feat/organize-approved
Feat/organize approved
- Loading branch information
Showing
2 changed files
with
46 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,18 @@ | ||
#!/bin/bash | ||
|
||
# Define the directory to move files to | ||
destination="approved" | ||
|
||
# Create the directory if it doesn't exist | ||
mkdir -p "$destination" | ||
|
||
# Loop through all files in the current directory | ||
for file in *; do | ||
# Check if the file is not one of the excluded files | ||
if [ -f "$file" ] && [[ "$file" != "CONTRIBUTING.md" && "$file" != "CODE_OF_CONDUCT.md" && "$file" != "README.md" ]]; then | ||
# Move the file to the destination directory | ||
mv "$file" "$destination/" | ||
fi | ||
done | ||
|
||
echo "Files moved successfully." |
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,28 @@ | ||
name: Ogranize Approved | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
organize-approved: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run script | ||
run: bash .github/scripts/organize_approved.sh | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: 'Organize Approved' |