From 75d9db1c9e8775e70e26e3c76b808026e2d65fe6 Mon Sep 17 00:00:00 2001 From: Shamsher Ansari Date: Thu, 18 Nov 2021 10:35:11 +0530 Subject: [PATCH] Add Prow like actions for BYOH (#247) * Add Prow like actions for BYOH * use latest version for prow github actions * sort actions * remove config area --- .github/labeler.yaml | 29 +++++++++++++++++++++ .github/workflows/lgtm.yaml | 16 ++++++++++++ .github/workflows/prow-github-actions.yaml | 28 ++++++++++++++++++++ .github/workflows/pull-request-labeler.yaml | 16 ++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 .github/labeler.yaml create mode 100644 .github/workflows/lgtm.yaml create mode 100644 .github/workflows/prow-github-actions.yaml create mode 100644 .github/workflows/pull-request-labeler.yaml diff --git a/.github/labeler.yaml b/.github/labeler.yaml new file mode 100644 index 000000000..c7dd4ab92 --- /dev/null +++ b/.github/labeler.yaml @@ -0,0 +1,29 @@ +area/docs: +- "docs/**/*" +- "**/*.md" + +area/installer: +- "agent-installer/**/*" + +area/apis: +- "apis/*" +- "apis/**/*" + +area/test-release: +- "hack/**/*" +- "test/**/*" +- "go.mod" +- "Makefile" + +area: +- "apis" +- "docs" +- "test-release" +- "installer" + +kind: +- "bug" +- "feature" +- "cleanup" +- "docs" +- "test-release" diff --git a/.github/workflows/lgtm.yaml b/.github/workflows/lgtm.yaml new file mode 100644 index 000000000..a5142d61a --- /dev/null +++ b/.github/workflows/lgtm.yaml @@ -0,0 +1,16 @@ +name: "Merge on lgtm label" +on: + pull_request: + branches: [ main ] + schedule: + - cron: "0 * * * *" + +jobs: + execute: + runs-on: ubuntu-latest + steps: + - uses: jpmcb/prow-github-actions@v1.1.3 + with: + jobs: 'lgtm' + github-token: "${{ secrets.GITHUB_TOKEN }}" + merge-method: 'squash' diff --git a/.github/workflows/prow-github-actions.yaml b/.github/workflows/prow-github-actions.yaml new file mode 100644 index 000000000..43629e40b --- /dev/null +++ b/.github/workflows/prow-github-actions.yaml @@ -0,0 +1,28 @@ +name: "Prow github actions" +on: + issue_comment: + types: [created] + +jobs: + execute: + runs-on: ubuntu-latest + steps: + - uses: jpmcb/prow-github-actions@v1.1.3 + with: + prow-commands: '/approve + /area + /assign + /cc + /close + /hold + /kind + /lgtm + /lock + /milestone + /priority + /remove + /reopen + /retitle + /unassign + /uncc' + github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pull-request-labeler.yaml b/.github/workflows/pull-request-labeler.yaml new file mode 100644 index 000000000..83a795f00 --- /dev/null +++ b/.github/workflows/pull-request-labeler.yaml @@ -0,0 +1,16 @@ +# Automatically label new pull requests based on the paths of files being changed +name: Pull Request Labeler + +on: + pull_request_target: + types: [opened, reopened, synchronize, ready_for_review] + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - name: Label pull requests based on the file paths + uses: actions/labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler.yaml