Skip to content

fix post list maker

fix post list maker #9

name: make recent post list
on: push
jobs:
make:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- 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: |-
git ls-tree -r --name-only HEAD | while read filename; do
unixtime=$(git log -1 --format="%at" -- "${filename}")
touchtime=$(date -r ${unixtime} +'%Y%m%d%H%M.%S')
touch -t ${touchtime} "${filename}"
done
- name: make post list
id: posts
run: node .github/make-post-list.js
- run:
echo "${{ steps.posts.outputs.posts }}"