Skip to content

Commit e7ae26d

Browse files
authored
Restrict docker/deploy jobs to upstream repo, cancel concurrent test runs (dask-contrib#254)
* Only run deploy/docker scripts in upstream repo * Stop concurrent jobs on same PR * Test concurrency
1 parent 2868ba3 commit e7ae26d

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
deploy:
99
name: Deploy
1010
runs-on: ubuntu-latest
11+
if: github.repository == 'dask-contrib/dask-sql'
12+
1113
steps:
1214
- uses: actions/checkout@v2
1315
- name: Cache local Maven repository

.github/workflows/docker.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
push_to_registry:
1212
name: Push Docker image to Docker Hub
1313
runs-on: ubuntu-latest
14+
if: github.repository == 'dask-contrib/dask-sql'
15+
1416
steps:
1517
- name: Check out the repo
1618
uses: actions/checkout@v2

.github/workflows/stylecheck.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
name: Python Style Check
33
on: [pull_request]
44

5+
# When this workflow is queued, automatically cancel any previous running
6+
# or pending jobs from the same branch
7+
concurrency:
8+
group: style-${{ github.head_ref }}
9+
cancel-in-progress: true
10+
511
jobs:
612
pre-commit:
713
runs-on: ubuntu-latest

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ on:
99
- main
1010
pull_request:
1111

12+
# When this workflow is queued, automatically cancel any previous running
13+
# or pending jobs from the same branch
14+
concurrency:
15+
group: test-${{ github.head_ref }}
16+
cancel-in-progress: true
17+
1218
jobs:
1319
build:
1420
# This build step should be similar to the deploy build, to make sure we actually test

0 commit comments

Comments
 (0)