Skip to content

Commit a695a28

Browse files
committed
✨ Features: update readme file
1 parent 5f8db2e commit a695a28

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/workflows/package-list.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Generate Package List
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: "0 0 * * *" # Runs every day at midnight UTC
9+
10+
jobs:
11+
generate-package-list:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v2
17+
18+
- name: Node Install
19+
run: |
20+
# npm install
21+
npm ci
22+
23+
- name: Generate package list
24+
run: |
25+
# Find the packages between the markers in the latest commit
26+
package_list=$(npm list --depth=0)
27+
28+
# Update the README.md file with the package list
29+
sed -i '/<!-- PACKAGES -->/,/<!-- END_PACKAGES -->/c\<!-- PACKAGES -->\n\n'```bash"${package_list}"```'\n\n<!-- END_PACKAGES -->' README.md
30+
31+
- name: Commit changes
32+
run: |
33+
git config --local user.email "amirajubolchi001@gmail.com"
34+
git config --local user.name "Raju Ghorai"
35+
git add README.md
36+
git commit -m "Update package list" || true
37+
git push origin HEAD:main
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ npm install
1111
## Showcase
1212

1313
![Screenshot_1682362604](https://user-images.githubusercontent.com/39460245/234090188-470c7334-1b9f-4baf-bc59-dd3a113a60fe.png)
14+
15+
16+
### List Of Packages Used
17+
<!-- PACKAGES -->
18+
<!-- END_PACKAGES -->

0 commit comments

Comments
 (0)