hosts #8979
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: hosts | |
# Controls when the workflow will run | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */1 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Git push | |
run: | | |
rm -rf .git/ | |
bash hosts.sh | |
git config --global user.name root | |
git init | |
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ github.repository }}" | |
git gc --aggressive | |
git add --all | |
git commit -m "$(date +%Y%m%d%H%M)" | |
git push -f -u origin master | |
# 删除无用 workflow runs; | |
- name: Delete workflow runs | |
uses: GitRML/delete-workflow-runs@main | |
with: | |
retain_days: 0.1 | |
keep_minimum_runs: 1 |