Skip to content

Commit cf1d30f

Browse files
authored
feat: single workflow and actions optimizations (#2140)
feat: single workflow and actions optimizations
1 parent 1984772 commit cf1d30f

11 files changed

Lines changed: 1150 additions & 940 deletions

File tree

.github/actions/setup-python/action.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/actions/setup-rust/action.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ updates:
88
open-pull-requests-limit: 1
99
labels:
1010
- dependencies
11+
groups:
12+
dev-deps:
13+
dependency-type: "development"
14+
prod-deps:
15+
dependency-type: "production"
16+
1117
ignore:
1218
- dependency-name: actix-rt
1319
versions:
@@ -69,6 +75,10 @@ updates:
6975
open-pull-requests-limit: 1
7076
labels:
7177
- dependencies
78+
groups:
79+
python-deps:
80+
patterns:
81+
- "*"
7282

7383
- package-ecosystem: "github-actions"
7484
directory: "/"
@@ -78,3 +88,7 @@ updates:
7888
open-pull-requests-limit: 1
7989
labels:
8090
- dependencies
91+
groups:
92+
actions-deps:
93+
patterns:
94+
- "*"

.github/workflows/checks.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Cleanup branch caches on merge
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
cleanup-cache:
9+
# Runs on both merged PRs and PRs closed without merging
10+
runs-on: ubuntu-latest
11+
permissions:
12+
actions: write
13+
steps:
14+
- name: Delete caches for closed branch
15+
run: |
16+
CACHE_IDS=$(gh cache list \
17+
--repo "${{ github.repository }}" \
18+
--ref "refs/heads/${{ github.head_ref }}" \
19+
--limit 100 \
20+
--json id \
21+
--jq '.[].id') || true
22+
23+
if [ -z "$CACHE_IDS" ]; then
24+
echo "No caches found for branch ${{ github.head_ref }}"
25+
exit 0
26+
fi
27+
28+
echo "Deleting caches for closed branch: ${{ github.head_ref }}"
29+
echo "$CACHE_IDS" | while IFS= read -r id; do
30+
echo " Deleting cache ID: $id"
31+
gh cache delete "$id" --repo "${{ github.repository }}" || true
32+
done
33+
env:
34+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/glean-probe-scraper.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [master]
66
pull_request:
77
branches: [master]
8+
89
permissions: {} # workflow-level default — deny all
910

1011
concurrency:

0 commit comments

Comments
 (0)