Update hosts #29116
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: Update hosts | |
on: | |
push: | |
schedule: | |
- cron: '0/30 * * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Run | |
run: | | |
bash domain2ip.sh | |
- name: Commit | |
id: commit | |
run: | | |
git config --local user.email "sengshinlee@gmail.com" | |
git config --local user.name "Sengshin Lee" | |
git add . | |
git commit -m "CST: $(TZ=Asia/Shanghai date "+%Y-%m-%d %H:%M:%S")" | |
continue-on-error: true | |
- name: Check on failures | |
if: steps.commit.outputs.status == 'failure' | |
run: exit 1 | |
- name: Push | |
run: | | |
git push -u origin main |