File tree Expand file tree Collapse file tree 2 files changed +21
-20
lines changed
Expand file tree Collapse file tree 2 files changed +21
-20
lines changed Original file line number Diff line number Diff line change 11name : Send a toot to Mastodon when you post a new blog post
22
3- on : [pull_request]
3+ on : [ pull_request ]
44
55jobs :
66 post :
77 runs-on : ubuntu-latest
88 steps :
9- - uses : actions/checkout@v3
10- - run : |
11- RECENTLY_ADDED_FILES=$(git log -1 --stat --grep=publish --oneline --name-only | tr '\n' ' ')
12- echo $RECENTLY_ADDED_FILES
13- echo "RECENTLY_ADDED_FILES=$RECENTLY_ADDED_FILES" >> $GITHUB_ENV
14- - name : Setup tmate session
15- uses : mxschmitt/action-tmate@v3
16- timeout-minutes : 10
9+ - uses : actions/checkout@v3
10+ with :
11+ fetch-depth : ' 0'
12+ - run : |
13+ echo $GITHUB_HEAD_REF
14+ git checkout $GITHUB_HEAD_REF
15+ RECENTLY_ADDED_FILES=$(git log -1 --stat --oneline --name-only | tr '\n' '|')
16+ echo $RECENTLY_ADDED_FILES
17+ echo "RECENTLY_ADDED_FILES=$RECENTLY_ADDED_FILES" >> $GITHUB_ENV
18+
1719
18- - name : Post to Mastodon
19- uses : sumit4613/post-to-mastodon@main
20- if : " contains(github.event.head_commit.message, 'publish')"
21- with :
22- message : " Hello, folks! I just posted a new blog post. Check it out!"
23- base-blog-url : " https://sumit4613.github.io/posts/"
24- access-token : ${{ secrets.MASTODON_ACCESS_TOKEN }}
25- host : " fosstodon.org"
26- port : " 443"
27- api : " api/v1"
20+ - name : Post to Mastodon
21+ uses : sumit4613/post-to-mastodon@main
22+ with :
23+ message : " Hello, folks! I just posted a new blog post. Check it out!"
24+ base_blog_url : " https://sumit4613.github.io/posts/"
25+ access_token : ${{ secrets.MASTODON_ACCESS_TOKEN }}
26+ host : " fosstodon.org"
27+ port : " 443"
28+ api : " api/v1"
Original file line number Diff line number Diff line change 22
33new change
44
5- another change
5+ let's see if action works or not
You can’t perform that action at this time.
0 commit comments