Skip to content

Commit

Permalink
add_workflow_auto_updates_snapshot (#82)
Browse files Browse the repository at this point in the history
* add_workflow_auto_updates_snapshot
---------

Co-authored-by: lqS0317 <[email protected]>
  • Loading branch information
lqS0317 and lqS0317 authored May 9, 2024
1 parent 5453ce7 commit 2950f08
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: update readme
on:
schedule:
- cron: '0 5 * * *'
run-name: update readme
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{secrets.PAT}}
ref: main
- name: Update README
run: |
date=$(date +%Y%m%d)
current_time=$(grep -Eo '[0-9]{8}' run-node-mainnetv2.md |head -n1)
sed -i "s/${current_time}/$date/g" run-node-mainnetv2.md
git config --global user.email "[email protected]"
git config --global user.name "mantle-github-bot"
git add run-node-mainnetv2.md
git commit -m "update snapshot tar date"
git push https://mantle-github-bot:${{ secrets.PAT }}@github.com/mantlenetworkio/networks.git main

0 comments on commit 2950f08

Please sign in to comment.