Repository navigation
chore: update workflows to be idiomatic, DRY, and efficient #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
somethingwithproof
merged 4 commits into
main
from
chore/update-workflows-idiomatic-dry-efficient
Jul 20, 2026
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
840a33e
chore: update workflows to be idiomatic, DRY, and efficient - full SH…
somethingwithproof 4a4f32a
chore: update workflows to be idiomatic, DRY, and efficient - full SH…
somethingwithproof 9f46da9
fix(ci): deduplicate coverage and pin remaining actions
somethingwithproof a8ced75
Merge origin/main and resolve workflow conflicts
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,66 @@ | ||
| --- | ||
| name: Dependabot Auto-Merge | ||
|
|
||
| on: | ||
| pull_request: | ||
| "on": | ||
| pull_request_target: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| schedule: | ||
| - cron: "17,47 * * * *" | ||
| workflow_dispatch: | ||
| branches: [ main ] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| contents: read | ||
| checks: read | ||
|
|
||
| concurrency: | ||
| group: dependabot-auto-merge | ||
| cancel-in-progress: false | ||
|
Comment on lines
+15
to
+17
|
||
|
|
||
| jobs: | ||
| dependabot-auto-merge: | ||
| runs-on: [self-hosted, linux, x64] | ||
| if: ${{ github.actor == 'dependabot[bot]' }} | ||
|
|
||
| merge: | ||
| if: >- | ||
| github.event_name != 'pull_request_target' || | ||
| github.actor == 'dependabot[bot]' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| checks: read | ||
|
Comment on lines
+24
to
+28
|
||
| steps: | ||
| - name: Dependabot metadata | ||
| id: metadata | ||
| uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v2 | ||
| with: | ||
| github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
|
||
| - name: Auto-merge PR | ||
| if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }} | ||
| run: gh pr merge --auto --squash "$PR_URL" | ||
| - name: Merge Dependabot pull requests with successful checks | ||
| shell: bash | ||
| env: | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| gh pr list \ | ||
| --repo "$GITHUB_REPOSITORY" \ | ||
| --state open \ | ||
| --author "app/dependabot" \ | ||
| --json number,isDraft,mergeable \ | ||
| --jq '.[] | | ||
| select(.isDraft == false and .mergeable == "MERGEABLE") | | ||
| .number' | | ||
| while read -r pr; do | ||
| [ -n "$pr" ] || continue | ||
|
|
||
| states=$(gh pr checks "$pr" \ | ||
| --repo "$GITHUB_REPOSITORY" \ | ||
| --json state \ | ||
| --jq '.[].state' 2>/dev/null || true) | ||
|
|
||
| # Fail closed when a repository has no CI checks. | ||
| [ -n "$states" ] || continue | ||
|
|
||
| blocked='^(PENDING|QUEUED|IN_PROGRESS|FAILURE|ERROR|CANCELLED|' | ||
| blocked+='STALE|ACTION_REQUIRED)$' | ||
| if grep -Eq "$blocked" <<<"$states"; then | ||
| continue | ||
| fi | ||
|
Comment on lines
+48
to
+60
|
||
|
|
||
| gh pr merge "$pr" \ | ||
| --repo "$GITHUB_REPOSITORY" \ | ||
| --squash \ | ||
| --delete-branch | ||
| done | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.