keep-repo-active #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: keep-repo-active | |
on: | |
schedule: | |
- cron: "0 1 * * 1" | |
workflow_dispatch: | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Update keep-repo-active.txt | |
run: | | |
now=$(date +"%Y-%m-%d %H:%M:%S") | |
echo -e "[临时文件] 用于保持仓库的活跃,避免 Github Action 被禁用,如果以后不再使用,请与 .github/workflows/keep-repo-active.yml 一并删除。 \n$now" > temp/keep-repo-active.txt | |
cat temp/keep-repo-active.txt | |
shell: bash | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Update keep-repo-active.txt |