Skip to content

Commit 34595a2

Browse files
committed
chore(dependabot): why old used by cicd
1 parent 951255a commit 34595a2

File tree

3 files changed

+30
-25
lines changed

3 files changed

+30
-25
lines changed

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

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,32 @@ permissions:
1111
pull-requests: write
1212

1313
jobs:
14-
# works alongside branch protection rules
14+
# works alongside branch protection rules
1515
auto-merge-minor-and-patch:
16+
runs-on: ubuntu-latest
17+
if: ${{ github.actor == 'dependabot[bot]' }}
18+
steps:
19+
- name: extract update type
20+
id: extract
21+
run: |
22+
pr_title="${{ github.event.pull_request.title }}"
23+
if [[ $pr_title == *"(major)"* ]]; then
24+
echo "update_type=major" >> $github_output
25+
else
26+
echo "update_type=minor_or_patch" >> $github_output
27+
fi
28+
29+
- name: set up github cli
30+
uses: cli/cli-action@v2
31+
32+
- name: auto-merge non-major updates
33+
if: ${{ steps.extract.outputs.update_type == 'minor_or_patch' }}
34+
run: gh pr merge --auto --merge "$pr_url"
35+
env:
36+
pr_url: ${{ github.event.pull_request.html_url }}
37+
github_token: ${{ secrets.github_token }}
38+
39+
auto-merge-major:
1640
runs-on: ubuntu-latest
1741
if: ${{ github.actor == 'dependabot[bot]' }}
1842
steps:
@@ -24,13 +48,11 @@ jobs:
2448
echo "update_type=major" >> $GITHUB_OUTPUT
2549
else
2650
echo "update_type=minor_or_patch" >> $GITHUB_OUTPUT
27-
fi
28-
2951
- name: Set up GitHub CLI
3052
uses: cli/cli-action@v2
31-
32-
- name: Auto-merge non-major updates
33-
if: ${{ steps.extract.outputs.update_type == 'minor_or_patch' }}
53+
54+
- name: Auto-merge major updates
55+
if: ${{ steps.extract.outputs.update_type == 'major' }}
3456
run: gh pr merge --auto --merge "$PR_URL"
3557
env:
3658
PR_URL: ${{ github.event.pull_request.html_url }}

.github/workflows/pull_request.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,4 @@ jobs:
2828
UNITTESTS_APPSETTINGS_PRODUCTION: ${{ secrets.UNITTESTS_APPSETTINGS_PRODUCTION }}
2929
WASMSTATICCLIENT_APPSETTINGS_PRODUCTION: ${{ secrets.WASMSTATICCLIENT_APPSETTINGS_PRODUCTION }}
3030
WASMSERVERHOSTCLIENT_APPSETTINGS_PRODUCTION: ${{ secrets.WASMSERVERHOSTCLIENT_APPSETTINGS_PRODUCTION }}
31-
WASMSERVERHOST_APPSETTINGS_PRODUCTION: ${{ secrets.WASMSERVERHOST_APPSETTINGS_PRODUCTION }}
32-
33-
31+
WASMSERVERHOST_APPSETTINGS_PRODUCTION: ${{ secrets.WASMSERVERHOST_APPSETTINGS_PRODUCTION }}

.github/workflows/reuseable-ci-checks.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ on:
3333
required: true
3434
TEL_GIT_PACKAGES_TOKEN:
3535
required: true
36-
37-
36+
3837
env:
3938

4039
# Permission
@@ -134,7 +133,6 @@ jobs:
134133
/p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \
135134
/p:DisablePackageGeneration=true
136135
137-
138136
reuseable-ci-checks-branch-name-check:
139137
name: Check branch names
140138
if: success() || failure()
@@ -186,17 +184,6 @@ jobs:
186184
exit 1
187185
fi
188186
189-
# qqqq drop
190-
# if [[ "$BRANCH_NAME" =~ ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|sample|security|config|bugfix|hotfix)-[a-zA-Z0-9._/-]+$ ]] || [[ "$BRANCH_NAME" == "master" ]]; then
191-
# echo "✅ Branch name is valid"
192-
# else
193-
# echo "❌ Invalid branch name: $BRANCH_NAME"
194-
# echo "Branch names must follow one of the allowed prefixes:"
195-
# echo " build-*, feat-*, fix-*, bugfix-*, hotfix-*, build-*, chore-*, ci-*, docs-*, perf-*, refactor-*, revert-*, style-*, test-*, sample-*, security-*, config-*, bugfix-*, hotfix-*"
196-
# exit 1
197-
# fi
198-
199-
200187
reuseable-ci-checks-commitlint:
201188
name: Check commit names
202189
runs-on: ubuntu-latest
@@ -313,7 +300,6 @@ jobs:
313300
- name: Ensure browsers are installed
314301
run: pwsh TELBlazor.Components.ShowCase.E2ETests/bin/Release/net8.0/playwright.ps1 install --with-deps
315302

316-
317303
- name: Run tests with coverage threshold check
318304
id: unit_e2e_tests
319305
run: |
@@ -379,7 +365,6 @@ jobs:
379365
echo "❌ One or more steps failed."
380366
exit 1
381367
382-
383368
reuseable-ci-checks-check-for-failed-jobs:
384369
name: Check for failures
385370
if: ${{ inputs.runall }}

0 commit comments

Comments
 (0)