diff --git a/README.md b/README.md index 0692803..1aa130c 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ jobs: keep_history: true ``` -Set the random hour range to `1-21` [UTC+8 time zone], running only 5 times a day every 15 days, but not immediately pushing and commit to the repository. This means that there are push operations in the steps after the workflow file, avoiding multiple push operations!!! +Set the random hour range to `1-21` [UTC+8 time zone], running only 7 times a day every 15 days, but not immediately pushing and commit to the repository. This means that there are push operations in the steps after the workflow file, avoiding multiple push operations!!! ```yml name: 'random-cron' @@ -72,13 +72,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT }} fetch-depth: 2 - name: Random Cron - uses: grbnb/random-workflow-cron@v2 + uses: grbnb/random-workflow-cron@v1 with: push_switch: false time_zone: "UTC+8" @@ -134,7 +134,7 @@ Error: Invalid exit code: 128 Add GitHub API `token` key to your workflow yml file at `uses: actions/checkout@v3` in step ```yml - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT }} fetch-depth: 2 diff --git a/README_zh.md b/README_zh.md index 6730bdd..490f544 100644 --- a/README_zh.md +++ b/README_zh.md @@ -57,7 +57,7 @@ jobs: keep_history: true ``` -设置随机小时范围为`1-21`[UTC+8时区],每间隔15天并且一天只运行5次, 但是不立即推送提交到仓库,即工作流文件后面的步骤存在推送操作,避免多次推送!!! +设置随机小时范围为`1-21`[UTC+8时区],每间隔15天并且一天只运行7次, 但是不立即推送提交到仓库,即工作流文件后面的步骤存在推送操作,避免多次推送!!! ```yml name: 'random-cron' @@ -72,13 +72,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT }} fetch-depth: 2 - name: Random Cron - uses: grbnb/random-workflow-cron@v2 + uses: grbnb/random-workflow-cron@v1 with: push_switch: false time_zone: "UTC+8" @@ -134,7 +134,7 @@ Error: Invalid exit code: 128 添加GitHub API `token`密钥到工作流yml文件的`uses:actions/checkout@v3`步骤中 ```yml - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT }} fetch-depth: 2 diff --git a/action.yml b/action.yml index 6f0c192..88e0d2b 100644 --- a/action.yml +++ b/action.yml @@ -54,14 +54,14 @@ runs: using: 'composite' steps: - if: ${{ inputs.push_switch == 'true' }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ inputs.github_token }} repository: ${{ inputs.repository }} ref: ${{ inputs.ref_branch }} fetch-depth: 2 - shell: bash - run: bash ${{ github.action_path }}/cron.sh + run: bash "${{ github.action_path }}/cron.sh" env: workflow_name: ${{ inputs.workflow_name }} push_switch: ${{ inputs.push_switch }}