From 3c7dd55dc4c10177ff140271fa7d47d4901ab733 Mon Sep 17 00:00:00 2001 From: Axel Christ Date: Tue, 11 Apr 2023 16:54:27 +0200 Subject: [PATCH] Add dependabot auto-merge --- .github/workflows/dependabot-auto-merge.yml | 27 +++++++++++++++++++ .../workflows/docs-kustomize-validation.yml | 13 +++++++++ .github/workflows/docs-lint.yml | 13 +++++++++ .github/workflows/docs-test.yml | 14 ++++++++++ .../workflows/{golangci-lint.yml => lint.yml} | 0 .github/workflows/test.yml | 2 +- 6 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/dependabot-auto-merge.yml create mode 100644 .github/workflows/docs-kustomize-validation.yml create mode 100644 .github/workflows/docs-lint.yml create mode 100644 .github/workflows/docs-test.yml rename .github/workflows/{golangci-lint.yml => lint.yml} (100%) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..2d146512 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,27 @@ +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Approve the PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/docs-kustomize-validation.yml b/.github/workflows/docs-kustomize-validation.yml new file mode 100644 index 00000000..266e3517 --- /dev/null +++ b/.github/workflows/docs-kustomize-validation.yml @@ -0,0 +1,13 @@ +name: Kustomize Validation + +on: + pull_request: + paths: + - 'docs/**' + - '**/*.md' + +jobs: + kustomize-validation: + runs-on: ubuntu-latest + steps: + - run: 'echo "No kustomize validation required"' diff --git a/.github/workflows/docs-lint.yml b/.github/workflows/docs-lint.yml new file mode 100644 index 00000000..a6fe5044 --- /dev/null +++ b/.github/workflows/docs-lint.yml @@ -0,0 +1,13 @@ +name: Lint Docs + +on: + pull_request: + paths: + - 'docs/**' + - '**/*.md' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - run: 'echo "No lint required"' diff --git a/.github/workflows/docs-test.yml b/.github/workflows/docs-test.yml new file mode 100644 index 00000000..748003d2 --- /dev/null +++ b/.github/workflows/docs-test.yml @@ -0,0 +1,14 @@ +name: Pull Request Docs test + +on: + pull_request: + paths: + - 'docs/**' + - '**/*.md' + +jobs: + checks: + name: test + runs-on: ubuntu-latest + steps: + - run: 'echo "No test required"' diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/lint.yml similarity index 100% rename from .github/workflows/golangci-lint.yml rename to .github/workflows/lint.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d1f177dc..d6e8a60c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: jobs: checks: - name: run + name: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v3