From f838572ec86faf4bf24479086187ab6abc79e5da Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Wed, 27 Jul 2022 05:38:29 +0200 Subject: [PATCH] separate dco from spotless, make dco only run for pull requests. Run on workflow dispatch on demand (#4165) Signed-off-by: Antoine Toulme Co-authored-by: Sally MacFarlane --- .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 8fc4b98f56..a1fa3e3916 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 0000000000..c50fa6219a --- /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