Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run preview_ci once a day #15551

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/preview_ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Preview - CI
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
push:
paths-ignore:
- '**/*.md'
Expand All @@ -10,9 +13,27 @@ env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
check_date:
runs-on: ${{ matrix.os }}
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- 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"

test:
runs-on: ${{ matrix.os }}
name: Build, Test, Deploy
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
strategy:
fail-fast: false
matrix:
Expand Down
Loading