mirror of
https://github.com/LamGC/quickly-conf-sshd.git
synced 2025-04-29 22:27:32 +00:00
Create main.yml
This commit is contained in:
parent
d1955e24c8
commit
2d0a28bad8
40
.github/workflows/main.yml
vendored
Normal file
40
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: 更新个人访问地址
|
||||
|
||||
on:
|
||||
# schedule:
|
||||
# - cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
# 使用 actions/github-script 向 README 文件写入个人访问地址。
|
||||
check-updates:
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.COMMIT_TOKEN }}
|
||||
- name: Commit
|
||||
run: |
|
||||
sed -i "s/ssh.lamgc.me/$REPLACEMENT_VALUE/g" README.md
|
||||
git config --global user.name "$GIT_USERNAME"
|
||||
git config --global user.email "$GIT_EMAIL"
|
||||
git add README.md
|
||||
git commit -m "更新个人访问地址"
|
||||
git push -u origin main
|
||||
env:
|
||||
REPLACEMENT_VALUE: ${{ secrets.REPLACEMENT_VALUE }}
|
||||
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
|
||||
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
|
||||
- name: Commit changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: 更新个人访问地址
|
||||
commit_options: '--no-verify'
|
||||
push_options: '--force'
|
||||
file_pattern: LATEST_VERSION
|
Loading…
Reference in New Issue
Block a user