From 790951a065f503a3ec260e43a2cd918188e48f2d Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Wed, 22 Jul 2020 14:19:43 -0700 Subject: [PATCH] actions: Add action to perform checks for pull requests Use github actions for performing wip and DCO checks on PRs. Note since external actions for DCO check access github token, a particular sha for the actions is used. Fixes: github.com/kata-containers/kata-containers#437 Signed-off-by: Archana Shinde --- .github/workflows/PR-wip-checks.yaml | 21 +++++++++++++++++++++ .github/workflows/dco-check.yaml | 22 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/PR-wip-checks.yaml create mode 100644 .github/workflows/dco-check.yaml diff --git a/.github/workflows/PR-wip-checks.yaml b/.github/workflows/PR-wip-checks.yaml new file mode 100644 index 0000000000..16f8167b2b --- /dev/null +++ b/.github/workflows/PR-wip-checks.yaml @@ -0,0 +1,21 @@ +name: Pull request WIP checks +on: + pull_request: + types: + - opened + - synchronize + - reopened + - edited + - labeled + - unlabeled + +jobs: + pr_wip_check: + runs-on: ubuntu-latest + name: WIP Check + steps: + - name: WIP Check + uses: tim-actions/wip-check@1c2a1ca6c110026b3e2297bb2ef39e1747b5a755 + with: + labels: '["do-not-merge", "wip", "rfc"]' + keywords: '["WIP", "wip", "RFC", "rfc", "dnm", "DNM", "do-not-merge"]' diff --git a/.github/workflows/dco-check.yaml b/.github/workflows/dco-check.yaml new file mode 100644 index 0000000000..159dec2e1a --- /dev/null +++ b/.github/workflows/dco-check.yaml @@ -0,0 +1,22 @@ +name: DCO check +on: + pull_request: + types: + - opened + - reopened + - synchronize + +jobs: + dco_check_job: + runs-on: ubuntu-latest + name: DCO Check + steps: + - name: Get PR Commits + id: 'get-pr-commits' + uses: tim-actions/get-pr-commits@ed97a21c3f83c3417e67a4733ea76887293a2c8f + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: DCO Check + uses: tim-actions/dco@2fd0504dc0d27b33f542867c300c60840c6dcb20 + with: + commits: ${{ steps.get-pr-commits.outputs.commits }}