Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Nov 24, 2022
1 parent bfc4fa1 commit c4286b9
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/dependabot_automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Dependabot auto-merge
on:
pull_request

permissions:
contents: write
pull-requests: write

jobs:
wait_for_checks:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Wait for check is finished
uses: lewagon/wait-on-check-action@v1.2.0
id: wait_for_checks
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
running-workflow-name: wait_for_checks
check-regexp: Tests
repo-token: ${{ secrets.PR_TOKEN }}
wait-interval: 10
dependabot:
needs: [wait_for_checks]
name: Dependabot auto-merge
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.3.5
with:
github-token: "${{ secrets.PR_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.PR_TOKEN}}
7 changes: 6 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
on: [push, pull_request]
on:
push:
branches:
- master
- main
pull_request:
name: Linter
jobs:
Golint:
Expand Down

0 comments on commit c4286b9

Please sign in to comment.