From 960d2d049b0c09defe90c70df7723c87af52150a Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Mon, 25 Jul 2022 21:06:36 -0700 Subject: [PATCH] separate dco from spotless, make dco only run for pull requests. Run on workflow dispatch on demand Signed-off-by: Antoine Toulme --- .github/workflows/checks.yml | 16 ++-------------- .github/workflows/dco.yml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/dco.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 8fc4b98f560..a1fa3e3916f 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -3,6 +3,7 @@ on: push: branches: [ main ] pull_request: + workflow_dispatch: jobs: spotless: @@ -18,17 +19,4 @@ jobs: java-version: 11 cache: gradle - name: spotless - run: ./gradlew --no-daemon --parallel clean spotlessCheck - dco: - runs-on: ubuntu-latest - if: ${{ github.actor != 'dependabot[bot]' }} - steps: - - name: Get PR Commits - id: 'get-pr-commits' - uses: tim-actions/get-pr-commits@v1.2.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: DCO Check - uses: tim-actions/dco@v1.1.0 - with: - commits: ${{ steps.get-pr-commits.outputs.commits }} \ No newline at end of file + run: ./gradlew --no-daemon --parallel clean spotlessCheck \ No newline at end of file diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml new file mode 100644 index 00000000000..c50fa6219aa --- /dev/null +++ b/.github/workflows/dco.yml @@ -0,0 +1,19 @@ +name: dco +on: + pull_request: + workflow_dispatch: + +jobs: + dco: + runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' }} + steps: + - name: Get PR Commits + id: 'get-pr-commits' + uses: tim-actions/get-pr-commits@v1.2.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: DCO Check + uses: tim-actions/dco@v1.1.0 + with: + commits: ${{ steps.get-pr-commits.outputs.commits }} \ No newline at end of file