|
8 | 8 | pull_request:
|
9 | 9 | branches:
|
10 | 10 | - master
|
| 11 | + schedule: |
| 12 | + - cron: "0 2 * * *" |
11 | 13 |
|
12 | 14 | concurrency:
|
13 | 15 | group: unit-${{ github.head_ref }}
|
|
17 | 19 | pre-commit:
|
18 | 20 | runs-on: ubuntu-latest
|
19 | 21 | if: >
|
20 |
| - github.event.pull_request.draft == false && |
| 22 | + (github.event.pull_request.draft == false && |
21 | 23 | !contains(github.event.pull_request.labels.*.name, 'ci/skip') &&
|
22 |
| - !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/') |
| 24 | + !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || |
| 25 | + github.event_name == 'schedule' |
23 | 26 | steps:
|
24 | 27 | - name: Get GitHub App token
|
25 | 28 | id: get_token
|
|
38 | 41 | - name: Install pre-commit
|
39 | 42 | run: python -m pip install pre-commit
|
40 | 43 | - name: set PY
|
41 |
| - run: echo "PY=$(python -c 'import hashlib, sys, platform;print(hashlib.sha256(platform.python_version().encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV |
42 |
| - - uses: actions/cache@v2 |
| 44 | + run: echo "PY=$(python -c 'import platform;print(platform.python_version())')" >> $GITHUB_ENV |
| 45 | + - uses: actions/cache@v3 |
43 | 46 | with:
|
44 | 47 | path: ~/.cache/pre-commit
|
45 | 48 | key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
|
78 | 81 | # - platform: windows-latest
|
79 | 82 | # python-version: 3.7
|
80 | 83 | runs-on: ${{ matrix.platform }}
|
81 |
| - if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/') |
| 84 | + if: (github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || github.event_name == 'schedule' |
82 | 85 | steps:
|
83 | 86 | - uses: actions/checkout@v3
|
84 | 87 | - name: Set up Python ${{ matrix.python-version }}
|
|
0 commit comments