Skip to content

Commit 43b8805

Browse files
committed
feat: update workflows
1 parent 853be93 commit 43b8805

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

.github/workflows/blog-posts.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
name: Blog Posts
22

3-
on:
4-
workflow_dispatch:
5-
schedule:
6-
- cron: "35 0 * * *" # 6:05 AM IST
7-
83
jobs:
94
update-posts:
105
runs-on: ubuntu-latest

.github/workflows/get-followers.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
name: Get Followers
22

3-
on:
4-
workflow_dispatch:
5-
schedule:
6-
- cron: "35 0 * * *" # 6:05 AM IST
7-
83
jobs:
94
update-followers:
105
runs-on: ubuntu-latest
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Update Readme
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "30 0 * * *"
7+
8+
jobs:
9+
update-followers:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Update followers list
14+
run: |
15+
cd scripts && npm install && ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }} npm run get:followers
16+
- name: Update Blog Posts
17+
run: |
18+
cd scripts && npm install && ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }} npm run get:posts
19+
- name: Commit changes
20+
run: |
21+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
22+
git config --local user.name "github-actions[bot]"
23+
git add -A
24+
git diff-index --quiet HEAD || git commit -m "Updated README.md"
25+
- name: Pull changes
26+
run: git pull -r
27+
- name: Push changes
28+
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df
29+
with:
30+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}

0 commit comments

Comments
 (0)