From f7b6f7b244fc9324206b8b04938dc286f01ab7c0 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Mon, 11 Sep 2023 15:43:48 +0900 Subject: [PATCH] create reload dns action --- .github/workflows/reload-dns.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/reload-dns.yml 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"'