Skip to content

Commit 64efb79

Browse files
committed
test filename
1 parent 813ddcf commit 64efb79

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎.github/workflows/build_test.yml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
inputs:
55
post_title:
66
description: 'Used for filename and post.sh name. The space will be replaced by `-` inv the file name.'
7-
default: ''
7+
default: 'Something'
88
required: true
99
post_body:
1010
description: 'Use GitHub MD format'
@@ -16,7 +16,7 @@ on:
1616
required: true
1717
tags:
1818
description: 'Capitalized Tags separated by commas'
19-
default: ''
19+
default: 'Blah'
2020
required: true
2121
jobs:
2222
build:
@@ -25,7 +25,6 @@ jobs:
2525

2626
env:
2727
FILENAME_PREFIX: ./_posts/$(date +'%Y-%m-%d')-
28-
FILENAME: ./_posts/$(date +'%Y-%m-%d')-$( echo 'Event#${{ github.event.inputs.post_title }}' | sed -r 's/[# ]+/-/g' ).md
2928
MESSAGE: ${{ github.event.inputs.post_body }}
3029
POST: |
3130
---
@@ -47,7 +46,7 @@ jobs:
4746
run: |
4847
lastEvent=$(ls -LR1 | sed -E 's/[0-9]{4}-[0-9]{2}-[0-9]{2}-//;s/Event-//;s/-.*//;s/.md//' | sort -n | tail -1)
4948
echo "next_event=$((lastEvent+1))" >> $GITHUB_ENV
50-
echo "FILENAME=${{ env.FILENAME_PREFIX }}$( echo 'Event#${{ env.next_event }} ${{ github.event.inputs.post_title }}' | sed -r 's/[# ]+/-/g' ).md" >> $GITHUB_ENV
49+
echo "FILENAME=${{ env.FILENAME_PREFIX }}$( echo 'Event#$((lastEvent+1)) ${{ github.event.inputs.post_title }}' | sed -r 's/[# ]+/-/g' ).md" >> $GITHUB_ENV
5150
5251
5352
- name: Create post file

0 commit comments

Comments
 (0)