Skip to content

Commit 29b564c

Browse files
committed
add github action workflows
1 parent a96718a commit 29b564c

File tree

4 files changed

+118
-0
lines changed

4 files changed

+118
-0
lines changed

.github/issue_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### Project Suggestion Title
2+
_A concise title for your project suggestion._
3+
4+
### Description
5+
_Provide a detailed description of the project idea or feature you would like to propose._
6+
7+
### Benefits
8+
_Explain how this project or feature would benefit the community or improve the existing repository._
9+
10+
### Implementation Ideas
11+
_Offer any initial thoughts on how the project could be implemented, including potential technologies or approaches._
12+
13+
### Additional Context
14+
_Include any other relevant information, links, or references that might help._
15+
16+
### Suggested Contributors
17+
_If you have specific contributors in mind who might be interested in this project, please list them here._

.github/pull_request_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
### Developer Checklist
2+
- [ ] Adhered to the guidelines outlined in the README & Contributing file.
3+
- [ ] Maintained the correct directory structure (e.g., ProjectName/...yourfiles).
4+
- [ ] Please ensure to include a README file for enhanced project clarity.
5+
- [ ] Starred ⭐ the repository (optional).
6+
7+
### Summary
8+
###### _Please provide a brief summary here._
9+
10+
### Screenshot
11+
###### _Attach any relevant screenshots or GIFs here._
12+
13+
### Live Project Link
14+
###### _Include a link to the live project here._
15+
16+
17+
### Notes for Contributors:
18+
- Ensure to fill out each section thoroughly for clarity.
19+
- Use clear and concise language to help users understand the functionality of your script.
20+
- If applicable, include examples of usage in the description.
21+
- Keep the formatting consistent for a professional appearance.

.github/workflow/contributors.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Contributors
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
jobs:
8+
contributors:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: wow-actions/contributors-list@v1
12+
with:
13+
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
14+
round: true
15+
svgPath: CONTRIBUTORS.svg
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Generate Project List
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
generate-list:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
with:
15+
token: ${{ secrets.ACTION_TOKEN }}
16+
persist-credentials: true
17+
18+
- name: Fetch latest changes
19+
run: git fetch origin
20+
21+
- name: Merge changes
22+
run: |
23+
git merge origin/main || echo "No new changes to merge or merge conflict"
24+
25+
- name: Generate project list
26+
run: |
27+
exclude_dirs=(.github)
28+
exclude_files=("LICENSE" "README.md" "CONTRIBUTING.md" "Example README.md" "CODE_OF_CONDUCT.md" "PROJECTS.md")
29+
30+
projects=()
31+
for dir in */; do
32+
if [[ ! " ${exclude_dirs[@]} " =~ " ${dir%/} " ]]; then
33+
projects+=("$dir")
34+
fi
35+
done
36+
37+
echo "# Project List" > PROJECTS.md
38+
echo "" >> PROJECTS.md
39+
40+
for project in "${projects[@]}"; do
41+
project_name=${project%/}
42+
safe_project_name=${project_name// /-}
43+
echo "* [$project_name](./$safe_project_name)" >> PROJECTS.md
44+
done
45+
46+
for file in "${exclude_files[@]}"; do
47+
sed -i "/$file/d" PROJECTS.md
48+
done
49+
50+
# Debug output to check the content of PROJECTS.md
51+
cat PROJECTS.md
52+
53+
- name: Commit project list
54+
run: |
55+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
56+
git config --global user.name "github-actions[bot]"
57+
git add PROJECTS.md
58+
if ! git diff --cached --exit-code; then
59+
git commit -m "Update project list"
60+
git push --force-with-lease
61+
else
62+
echo "No changes to commit."
63+
fi
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}

0 commit comments

Comments
 (0)