Skip to content

Commit b52842d

Browse files
committed
deps: configure daily Dependabot with automerge
1 parent caad7c9 commit b52842d

4 files changed

Lines changed: 30 additions & 7 deletions

File tree

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: "pip"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "daily"
77
labels:
88
- "dependencies"
99
assignees:
@@ -19,7 +19,7 @@ updates:
1919
- package-ecosystem: "github-actions"
2020
directory: "/"
2121
schedule:
22-
interval: "weekly"
22+
interval: "daily"
2323
labels:
2424
- "dependencies"
2525
assignees:

.github/workflows/automerge.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dependabot auto-merge
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
automerge:
13+
runs-on: ubuntu-latest
14+
if: github.actor == 'dependabot[bot]'
15+
steps:
16+
- name: Enable auto-merge for Dependabot PRs
17+
run: gh pr merge --auto --squash "$PR_URL"
18+
env:
19+
PR_URL: ${{ github.event.pull_request.html_url }}
20+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/cd.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: treemapper CD
44
permissions:
55
contents: write
66

7-
on:
7+
'on':
88
workflow_dispatch:
99
inputs:
1010
version:
@@ -269,8 +269,9 @@ jobs:
269269
# Verify the built packages have correct version in filename
270270
echo "Built packages:"
271271
ls -la dist/
272-
echo "Looking for version ${{ needs.prepare-version.outputs.version }} in package names..."
273-
ls dist/*${{ needs.prepare-version.outputs.version }}* || echo "WARNING: No packages found with expected version!"
272+
VERSION="${{ needs.prepare-version.outputs.version }}"
273+
echo "Looking for version ${VERSION} in package names..."
274+
ls dist/*${VERSION}* || echo "WARNING: No packages found!"
274275
275276
- name: Publish package distributions to PyPI
276277
uses: pypa/gh-action-pypi-publish@release/v1
@@ -302,7 +303,9 @@ jobs:
302303
echo "Current commit: $(git rev-parse HEAD)"
303304
304305
# Set up remote to point to the actual GitHub repository
305-
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
306+
REPO_URL="https://x-access-token:${{ secrets.GITHUB_TOKEN }}"
307+
REPO_URL="${REPO_URL}@github.com/${{ github.repository }}.git"
308+
git remote add origin "${REPO_URL}"
306309
307310
# Verify remote is set up correctly
308311
git remote -v

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permissions:
55
contents: read
66
security-events: write # For CodeQL
77

8-
on:
8+
'on':
99
pull_request:
1010
branches: ['**']
1111
push:

0 commit comments

Comments
 (0)