Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
linzjian666 authored Jan 29, 2024
1 parent 0dd33f5 commit 34965b3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ jobs:
- name: Run extract script
run: python main.py

- name: Set Date env
run: echo "DATE=$(date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
- name: Write time into README file
run: |
echo "DATE=$(date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
sed -Ei "s|最近提取于:\`UTC [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\`|最近提取于:\`UTC ${{ env.DATE }}\`|g" README.md
sed -Ei "s|recently extracted at: \`UTC [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\`|recently extracted at: \`UTC ${{ env.DATE }}\`|g" README.md
- name: Commit & Push changes
env:
Expand Down

0 comments on commit 34965b3

Please sign in to comment.