-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.1 KB
/
make-post-list.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: make recent post list
on: push
jobs:
make:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/cache@v3
id: cache
with:
path: node_modules
key: yarn-${{ hashFiles('**/yarn.lock') }}
- name: install
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
- name: set birthtime
run: chmod +x ./.github/set-birthtime.sh && ./.github/set-birthtime.sh
- name: make post list
id: posts
run: node .github/make-post-list.js
- run: |-
curl -L \
-X POST \
-H 'Accept: application/vnd.github+json' \
-H "Authorization: Bearer ${{ secrets.DISPATCH_TARGET_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/ooooorobo/ooooorobo/dispatches \
-d '{"event_type": "recent_post", "client_payload": { "posts": ${{ steps.posts.outputs.posts }} } }'