Skip to content

Bump Serilog and Serilog.Sinks.InMemory #99

Bump Serilog and Serilog.Sinks.InMemory

Bump Serilog and Serilog.Sinks.InMemory #99

# The intention is minor and patch should be merged into the dependabot branch automatically

Check failure on line 1 in .github/workflows/automerge-passing-minor-patch-dependabot-prs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/automerge-passing-minor-patch-dependabot-prs.yml

Invalid workflow file

(Line: 39, Col: 5): Unexpected value 'auto-merge-major', (Line: 40, Col: 5): 'runs-on' is already defined, (Line: 41, Col: 5): 'if' is already defined, (Line: 42, Col: 5): 'steps' is already defined
name: Dependabot Auto-Merge
on:
pull_request:
branches: [ Automatic_version_update_dependabot ]
permissions:
contents: write
pull-requests: write
jobs:
# works alongside branch protection rules
auto-merge-minor-and-patch:
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: set up github cli
uses: cli/cli-action@v2
- name: auto-merge non-major updates
if: ${{ steps.extract.outputs.update_type == 'minor_or_patch' }}
run: gh pr merge --auto --merge "$pr_url"
env:
pr_url: ${{ github.event.pull_request.html_url }}
github_token: ${{ secrets.github_token }}
auto-merge-major:
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
- name: Set up GitHub CLI
uses: cli/cli-action@v2
- name: Auto-merge major updates
if: ${{ steps.extract.outputs.update_type == 'major' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}