From dfdf753f26dc49f48287cb9a007b3688881b9e2a Mon Sep 17 00:00:00 2001 From: kyy Date: Fri, 5 Sep 2025 11:34:51 +0900 Subject: [PATCH] =?UTF-8?q?git=20schedule=20=EA=B4=80=EB=A0=A8=20sh=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=20=EA=B6=8C=ED=95=9C=20=EB=B6=80=EC=97=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/main.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 016f0ac..ad2a31c 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -1,17 +1,27 @@ +# .gitea/workflows/main.yml name: Run Report Table on: schedule: - - cron: "10 2 * * *" + - cron: "10 2 * * *" # 11:10 KST is 02:10 UTC jobs: run-script: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 - - name: Run script + uses: actions/checkout@v4 + + - name: Fix line endings and permissions + shell: bash run: | - if [ $(date -u +%u) -eq 1 ]; then - ./run_table.sh 7d + sudo apt-get update -y && sudo apt-get install -y dos2unix + dos2unix run_table.sh + chmod +x run_table.sh + + - name: Run script + shell: bash + run: | + if [ "$(date -u +%u)" -eq 1 ]; then + bash ./run_table.sh 7d else - ./run_table.sh 24h + bash ./run_table.sh 24h fi