Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit a77de3f

Browse files
committed
new skip CI approach
1 parent 8c48758 commit a77de3f

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

.github/workflows/code.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,14 @@ name: Code CI
22

33
on:
44
push:
5-
branches:
6-
- "*"
7-
tags:
8-
- "*"
95
pull_request:
106
schedule:
117
# Run every Monday at 8am to check latest versions of dependencies
128
- cron: "0 8 * * MON"
139

1410
jobs:
15-
skip_check:
16-
runs-on: ubuntu-latest
17-
outputs:
18-
should_skip: ${{ steps.skip_check.outputs.should_skip }}
19-
steps:
20-
- id: skip_check
21-
# pinned to SHA for v4.0.0
22-
uses: fkirc/skip-duplicate-actions@9d116fa7e55f295019cfab7e3ab72b478bcf7fdd
23-
with:
24-
concurrent_skipping: "always"
25-
2611
lint:
27-
needs: skip_check
28-
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
12+
if: github.event_name != 'pull_request' || github.event.pull_request.repository == github.repository
2913
runs-on: "ubuntu-latest"
3014
steps:
3115
- name: Checkout
@@ -37,8 +21,7 @@ jobs:
3721
tox -e pre-commit,mypy
3822
3923
wheel:
40-
needs: skip_check
41-
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
24+
if: github.event_name != 'pull_request' || github.event.pull_request.repository == github.repository
4225
strategy:
4326
fail-fast: false
4427
matrix:
@@ -72,8 +55,7 @@ jobs:
7255
run: pipx run --python $(which python${{ matrix.python }}) --spec dist/*.whl ${GITHUB_REPOSITORY##*/} --version
7356

7457
test:
75-
needs: skip_check
76-
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
58+
if: github.event_name != 'pull_request' || github.event.pull_request.repository == github.repository
7759
strategy:
7860
fail-fast: false
7961
matrix:

.github/workflows/docs.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ name: Docs CI
22

33
on:
44
push:
5-
branches:
6-
# Add more branches here to publish docs from other branches
7-
- master
8-
- main
95
tags:
106
- "*"
117
pull_request:
128

139
jobs:
1410
docs:
11+
if: github.event_name != 'pull_request' || github.event.pull_request.repository == github.repository
1512
strategy:
1613
fail-fast: false
1714
matrix:

0 commit comments

Comments
 (0)