hosts update #610
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 update | |
on: | |
# push: | |
# branches: [ "main" ] | |
schedule: | |
- cron: "20 */8 * * *" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: build and run | |
run: | | |
cargo run --release --bin hosts -- --save --target github | |
- name: commit changes | |
run: | | |
cd ${{ github.workspace }} | |
git config user.email "actions@github.com" | |
git config user.name "Github Actions" | |
git add . | |
git commit -m "✈️🛩️ $(date -d '-8 hours ago' "+%Y-%m-%d %H:%M:%S")" | |
- name: push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.PERSONAL_TOKEN }} |