Skip to content

Commit 3ebbfdd

Browse files
authored
Batch Dependabot PRs (#19745)
1 parent 4086180 commit 3ebbfdd

18 files changed

+51
-3
lines changed

.github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: weekly
7+
day: "sunday"
8+
time: "09:00" # 9am UTC
79
ignore:
810
# Deprecated APIs, requires manual changes.
911
# TODO(xacrimon): Update Firestore and solve deprecations.
@@ -42,6 +44,8 @@ updates:
4244
directory: "/api"
4345
schedule:
4446
interval: weekly
47+
day: "sunday"
48+
time: "09:00" # 9am UTC
4549
ignore:
4650
# TODO(tross): Update after Firestore is updated
4751
- dependency-name: google.golang.org/genproto
@@ -57,6 +61,8 @@ updates:
5761
directory: "/"
5862
schedule:
5963
interval: weekly
64+
day: "sunday"
65+
time: "09:00" # 9am UTC
6066
open-pull-requests-limit: 10
6167
reviewers:
6268
- codingllama
@@ -67,6 +73,8 @@ updates:
6773
directory: "/lib/srv/desktop/rdp/rdpclient"
6874
schedule:
6975
interval: weekly
76+
day: "sunday"
77+
time: "09:00" # 9am UTC
7078
open-pull-requests-limit: 10
7179
reviewers:
7280
- codingllama

.github/workflows/assign.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ permissions:
3030
jobs:
3131
auto-request-review:
3232
name: Auto Request Review
33-
if: ${{ !github.event.pull_request.draft }}
33+
if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'dependabot/') }}
3434
runs-on: ubuntu-latest
3535
steps:
3636
# Checkout main branch of shared-workflow repository.

.github/workflows/build-macos.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ on:
2929
jobs:
3030
build:
3131
name: Build on Mac OS
32+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
3233
runs-on: macos-12 # TODO(r0mant): Update with large runner when it's available
3334

3435
permissions:

.github/workflows/build-windows.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ on:
2727
jobs:
2828
build:
2929
name: Build on Windows
30+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
3031
runs-on: windows-2022-16core
3132

3233
permissions:

.github/workflows/check.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ permissions:
3232
jobs:
3333
check-reviews:
3434
name: Checking reviewers
35-
if: ${{ !github.event.pull_request.draft }}
35+
if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'dependabot/') }}
3636
runs-on: ubuntu-latest
3737
steps:
3838
# Checkout main branch of shared-workflow repository.

.github/workflows/cifuzz.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818

1919
jobs:
2020
fuzzing:
21+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
2122
name: Fuzzing
2223
runs-on: ubuntu-22.04-32core
2324
permissions:

.github/workflows/codeql.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
jobs:
1818
analyze:
1919
name: Analyze
20+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
2021
runs-on: ubuntu-22.04-32core
2122
permissions:
2223
actions: read
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow combines all open Dependabot PRs into a single batched
2+
# PR, links all the Dependabot PRs to the new one, and closes all the
3+
# Dependabot PRs. The schedule is set to exactly 12 hours after the
4+
# Dependabot schedule.
5+
#
6+
# All workflows that run on PR should be skipped for Dependabot PRs
7+
# to prevent wasting CI cycles.
8+
name: 'Dependabot Batcher'
9+
on:
10+
workflow_dispatch:
11+
schedule:
12+
- cron: '0 21 * * 0' # At 9:00 PM every Sunday UTC
13+
14+
permissions:
15+
pull-requests: write
16+
contents: write
17+
18+
jobs:
19+
dependabot-batcher:
20+
name: 'Combine Dependabot PRs'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: 'Dependabot Batcher'
24+
uses: Legal-and-General/[email protected]
25+
with:
26+
token: ${{ secrets.GITHUB_TOKEN }} #required
27+
baseBranchName: 'master'

.github/workflows/dependency-review.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
jobs:
77
dependency-review:
8+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
89
uses: gravitational/shared-workflows/.github/workflows/dependency-review.yaml@main
910
permissions:
1011
contents: read

.github/workflows/doc-tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
jobs:
1111
doc-tests:
1212
name: Lint (Docs)
13+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
1314
runs-on: ubuntu-latest
1415

1516
permissions:

.github/workflows/integration-tests-non-root.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
jobs:
2424
test:
2525
name: Integration Tests (Non-root)
26+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
2627
runs-on: ubuntu-22.04-16core
2728

2829
permissions:

.github/workflows/integration-tests-root.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
jobs:
2424
test:
2525
name: Integration Tests (Root)
26+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
2627
runs-on: ubuntu-22.04-16core
2728

2829
permissions:

.github/workflows/label.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ permissions:
3030
jobs:
3131
auto-label-pr:
3232
name: Label Pull Request
33-
if: ${{ !github.event.pull_request.draft }}
33+
if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'dependabot/') }}
3434
runs-on: ubuntu-latest
3535
steps:
3636
# Checkout main branch of shared-workflow repository.

.github/workflows/lint.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
jobs:
1111
lint:
12+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
1213
name: Lint (Go)
1314
runs-on: ubuntu-22.04-16core
1415

.github/workflows/os-compatibility-test.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
jobs:
1111
build:
1212
name: OS Compatibility Build
13+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
1314
runs-on: ubuntu-22.04-16core
1415

1516
permissions:

.github/workflows/unit-tests-code.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
jobs:
2424
test:
2525
name: Unit Tests (Go)
26+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
2627
runs-on: ubuntu-22.04-32core
2728

2829
permissions:

.github/workflows/unit-tests-operator.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ on:
2727
jobs:
2828
test:
2929
name: Unit Tests (Operator)
30+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
3031
runs-on: ubuntu-22.04-16core
3132

3233
permissions:

.github/workflows/unit-tests-rust.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
jobs:
2424
test:
2525
name: Unit Tests (Rust)
26+
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
2627
runs-on: ubuntu-latest
2728

2829
permissions:

0 commit comments

Comments
 (0)