Skip to content

Commit

Permalink
Merge pull request #250 from MORE-Platform/249-dependabot-configuration
Browse files Browse the repository at this point in the history
#249 Update Dependabot-Configuration
  • Loading branch information
alireza-dhp authored Apr 26, 2024
2 parents d506041 + b9d670b commit ff13d18
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 14 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,29 @@ version: 2
updates:
- package-ecosystem: github-actions
directory: /
target-branch: 'develop'
assignees:
- ja-fra
schedule:
interval: weekly
groups:
github-action:
patterns:
- "actions/*"
docker:
patterns:
- "docker/*"
- package-ecosystem: maven
directory: /
target-branch: 'develop'
schedule:
interval: daily
ignore:
- # We want to stay on the v5 of the openapi-generator
dependency-name: "org.openapitools:openapi-generator-maven-plugin"
update-types: ["version-update:semver-major"]
groups:
maven-plugin:
patterns:
- "org.apache.maven.plugins:*"
- "org.codehaus.mojo:*"
34 changes: 34 additions & 0 deletions .github/workflows/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Dependabot Automation
on: pull_request

permissions:
contents: write
pull-requests: write
issues: write
repository-projects: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot Metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Label Major Updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-major'}}
run: |
gh label create "major-update" --color "B60205" --description "Major Dependency Update" --repo "$REPO" || true
gh pr edit "$PR_URL" --add-label "major-update"
env:
REPO: ${{github.repository}}
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable Auto-Merge for Patch Updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
19 changes: 5 additions & 14 deletions .github/workflows/test-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,11 @@ jobs:

steps:
- name: Download and Extract Artifacts
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
mkdir -p artifacts && cd artifacts
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
do
IFS=$'\t' read name url <<< "$artifact"
gh api $url > "$name.zip"
unzip -d "$name" "$name.zip"
done
uses: actions/download-artifact@v3
with:
path: artifacts
github-token: ${{secrets.GITHUB_TOKEN}}
run-id: ${{ github.event.workflow_run.id }}
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
Expand Down

0 comments on commit ff13d18

Please sign in to comment.