diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index d21f0fb611..3c1ee6447d 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -12,7 +12,7 @@ on: # branches: # - main schedule: - - cron: '0 3 * * *' # run at 3 AM UTC + - cron: '15 3 * * *' # run at 3:15 AM UTC defaults: run: @@ -21,11 +21,11 @@ defaults: jobs: prepare: name: Prepare - if: github.repository == 'nushell/nightly' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 + if: github.repository == 'nushell/nightly' with: ref: main fetch-depth: 0 @@ -34,6 +34,7 @@ jobs: - name: Setup Nushell uses: hustcer/setup-nu@v3 + if: github.repository == 'nushell/nightly' with: version: 0.81.0 env: @@ -41,6 +42,7 @@ jobs: - name: Prepare for Nightly Release shell: nu {0} + if: github.repository == 'nushell/nightly' run: | cd $env.GITHUB_WORKSPACE git checkout main @@ -182,12 +184,14 @@ jobs: cleanup: name: Cleanup - needs: release if: github.repository == 'nushell/nightly' runs-on: ubuntu-latest steps: + # Sleep for 30 minutes, waiting for the release to be published + - name: Waiting for Release + run: sleep 1800 + - name: Setup Nushell - if: ${{ always() }} # Always evaluates to true uses: hustcer/setup-nu@v3 with: version: 0.81.0 @@ -198,7 +202,6 @@ jobs: # Should only run in nushell/nightly repo - name: Delete Older Releases shell: nu {0} - if: ${{ always() }} # Always evaluates to true run: | let KEEP_COUNT = 10 let deprecated = (http get https://api.github.com/repos/nushell/nightly/releases | sort-by -r created_at | select tag_name id | range $KEEP_COUNT..)