From a72e60d80a57b8e6e67836441d7cbd970dad11c1 Mon Sep 17 00:00:00 2001 From: LamGC Date: Sun, 29 Oct 2023 10:49:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=9D=A5?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E6=9B=B4=E6=96=B0=20Readme.md=20=E7=9A=84=20?= =?UTF-8?q?Github=20Action.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 有一说一, 这个用编辑器替换不好嘛hhhhhh Co-authored-by: NANSIYV <39900381+nsv2051@users.noreply.github.com> --- .github/workflows/update-access-url.yml | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/update-access-url.yml diff --git a/.github/workflows/update-access-url.yml b/.github/workflows/update-access-url.yml new file mode 100644 index 0000000..1a76a56 --- /dev/null +++ b/.github/workflows/update-access-url.yml @@ -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 \ No newline at end of file