Skip to content

Commit

Permalink
Merge pull request #52 from RuslanGlaznyov/feat/organize-approved
Browse files Browse the repository at this point in the history
Feat/organize approved
  • Loading branch information
AddySiz authored Jan 6, 2024
2 parents ce464bd + 3cb8b61 commit ab29b16
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/scripts/organize_approved.sh
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."
28 changes: 28 additions & 0 deletions .github/workflows/organize_approved.yaml
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'

0 comments on commit ab29b16

Please sign in to comment.