diff --git a/.github/workflows/ios-selfhosted-build.yml b/.github/workflows/ios-selfhosted-build.yml index f77e9f7..fef26a0 100644 --- a/.github/workflows/ios-selfhosted-build.yml +++ b/.github/workflows/ios-selfhosted-build.yml @@ -31,26 +31,25 @@ on: Private App Store Connect API issuer key for submitting build to App Store. jobs: - detect-changes: - name: Detect Changes + detect_changes: runs-on: ubuntu-latest + name: Check latest commit outputs: - project: ${{ steps.changes.outputs.project }} + should_run: ${{ steps.should_run.outputs.should_run }} steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Detect Changes - uses: dorny/paths-filter@v3 - id: changes - with: - filters: | - project: - - '**' + - uses: actions/checkout@v4 + - name: print latest_commit + run: echo ${{ github.sha }} + - id: should_run + continue-on-error: true + name: Check latest commit is less than a day + if: ${{ github.event_name == 'schedule' }} + run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" build: runs-on: self-hosted timeout-minutes: 30 needs: detect-changes - if: ${{ needs.detect-changes.outputs.project == 'true' }} + if: ${{ needs.detect-changes.outputs.should_run == 'true' }} steps: - name: Checkout