Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This script seperate major and minor but we do merge them into the same branch.
# Having two steps allows us to easily turn off major changes in future and then script them to their own branch and pipeline.
name: Auto-merge Dependabot PRs
on:
pull_request:
types: [opened, synchronize]
branches: [Automatic_version_update_dependabot] # Make sure this matches your actual branch name

permissions:
contents: write
pull-requests: write

jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Extract update type
id: extract
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
if [[ $PR_TITLE == *"(major)"* ]]; then
echo "update_type=major" >> $GITHUB_OUTPUT
else
echo "update_type=minor_or_patch" >> $GITHUB_OUTPUT
fi

- name: Auto-merge minor and patch updates
if: steps.extract.outputs.update_type == 'minor_or_patch'
run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Auto-merge major updates
if: steps.extract.outputs.update_type == 'major'
run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 changes: 0 additions & 59 deletions .github/workflows/automerge-passing-minor-patch-dependabot-prs.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
branches-ignore:
- 'main'
- 'master'
# We currently dont intend to test the showcase per package bump so wont run for package bumps
# we will run on the collected bumps merging though
- 'dependabot/**'

workflow_dispatch:

permissions:
Expand Down Expand Up @@ -83,7 +87,7 @@ jobs:
echo "Semantic Release packages installed."
npm ls --depth=0 # Debug: List installed packages

#configured with .releaseserc
# Configured with .releaseserc
# Dry run we are not versioning the repo
- name: Run dev semantic version (None Blocking)
id: detect_semantic_version
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/workflow-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ The individual steps also automatically pass so can see if any error at the end
# Notes
- doesnt run easily with nektos act due to git ref checks and calling other workflows
- for tests use the run-tests-and-report-with-env-values.ps1 file
- dependabot duplicates tokens using dependabot secrets including write so can run checks
- autoverging is being tried for major and minor
- branch checks must pass for merge on automated_version

## Versioning
Via semantic release and recorded as a generate c# file used by a blazor component
Expand Down
Loading