diff --git a/.github/workflows/reload-dns.yml b/.github/workflows/reload-dns.yml new file mode 100644 index 0000000..540ac7f --- /dev/null +++ b/.github/workflows/reload-dns.yml @@ -0,0 +1,16 @@ +name: reload-dns +concurrency: fogtype.com +on: + workflow_dispatch: + schedule: + # 土曜日 02:30 (JST) は 金曜日 17:30 (UTC) + # https://time.is/compare/JST + # https://crontab.guru/#30_17_*_*_FRI + - cron: 30 17 * * FRI +jobs: + main: + runs-on: ubuntu-latest + steps: + - run: install -m 700 -d ~/.ssh + - run: install -m 600 <(echo '${{ secrets.DEPLOY_KEY }}') ~/.ssh/deploy_key + - run: ssh -i ~/.ssh/deploy_key -o 'StrictHostKeyChecking no' kou029w@fogtype.com 'sh -c "cd ~/fogtype.com && docker compose restart dns"'