File tree Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Original file line number Diff line number Diff line change 1
1
name : Latest blog post workflow
2
+
2
3
on :
3
- schedule : # Run workflow automatically
4
- - cron : ' 0 * * * * ' # Runs every hour, on the hour
5
- workflow_dispatch : # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly
4
+ push :
5
+ branches :
6
+ - main
6
7
7
8
jobs :
8
- update-readme-with-blog :
9
- name : Update this repo's README with latest blog posts
9
+ update-readme :
10
10
runs-on : ubuntu-latest
11
11
steps :
12
- - name : Checkout
13
- uses : actions/checkout@v4
14
- - name : Pull in dev.to posts
15
- uses : gautamkrishnar/blog-post-workflow@1.8.8
16
- with :
17
- feed_list : " https://dev.to/feed/gautamkrishnar"
12
+ - name : Checkout repository
13
+ uses : actions/checkout@v2
14
+ - name : Update README with latest blog posts
15
+ run : |
16
+ # your script to update README.md
17
+ - name : Commit changes
18
+ run : |
19
+ git config --global user.name 'github-actions[bot]'
20
+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
21
+ git add README.md
22
+ git commit -m "Updated with the latest blog posts"
23
+ - name : Push changes
24
+ env :
25
+ TOKEN : ${{ secrets.GH_TOKEN }}
26
+ run : |
27
+ git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
28
+ git push origin HEAD:main
You can’t perform that action at this time.
0 commit comments