feat: 添加用来快速更新 Readme.md 的 Github Action.

有一说一, 这个用编辑器替换不好嘛hhhhhh

Co-authored-by: NANSIYV <39900381+nsv2051@users.noreply.github.com>
This commit is contained in:
LamGC 2023-10-29 10:49:41 +08:00
parent 44a6cbbdbe
commit a72e60d80a
Signed by: LamGC
GPG Key ID: 6C5AE2A913941E1D

28
.github/workflows/update-access-url.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Update access url
on:
workflow_dispatch:
permissions:
contents: write
jobs:
update-url:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Update access url
run: |
sed -i "s/ssh.lamgc.me/$REPLACEMENT_VALUE/g" README.md
env:
# 要替换的个人访问地址例如ssh.lamgc.me
REPLACEMENT_VALUE: ${{ secrets.ACCESS_URL }}
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update access url to ${{ secrets.ACCESS_URL }}
commit_options: '--no-verify'
file_pattern: README.md