quickly-conf-sshd/.github/workflows/update-access-url.yml
LamGC a72e60d80a
feat: 添加用来快速更新 Readme.md 的 Github Action.
有一说一, 这个用编辑器替换不好嘛hhhhhh

Co-authored-by: NANSIYV <39900381+nsv2051@users.noreply.github.com>
2023-10-29 10:49:41 +08:00

28 lines
712 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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