Skip to content

Commit 1853127

Browse files
committed
test filename
1 parent 64efb79 commit 1853127

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎.github/workflows/build_test.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Site build test
22
on:
3+
push:
4+
tags: [".*"]
35
workflow_dispatch:
46
inputs:
57
post_title:
@@ -45,8 +47,10 @@ jobs:
4547
- name: Calculate event number
4648
run: |
4749
lastEvent=$(ls -LR1 | sed -E 's/[0-9]{4}-[0-9]{2}-[0-9]{2}-//;s/Event-//;s/-.*//;s/.md//' | sort -n | tail -1)
48-
echo "next_event=$((lastEvent+1))" >> $GITHUB_ENV
49-
echo "FILENAME=${{ env.FILENAME_PREFIX }}$( echo 'Event#$((lastEvent+1)) ${{ github.event.inputs.post_title }}' | sed -r 's/[# ]+/-/g' ).md" >> $GITHUB_ENV
50+
nextEvent=$((lastEvent+1))
51+
filename=$( echo "Event-$nextEvent-${{ github.event.inputs.post_title }}" | sed -r 's/[ ]+/-/g' ).md
52+
echo "next_event=$nextEvent" >> $GITHUB_ENV
53+
echo "FILENAME=${{ env.FILENAME_PREFIX }}${filename}" >> $GITHUB_ENV
5054
5155
5256
- name: Create post file

0 commit comments

Comments
 (0)