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