From 56c3b55e9476a3ac319e88778ed53eae3323b429 Mon Sep 17 00:00:00 2001 From: monusingh-1 Date: Wed, 11 Oct 2023 15:58:22 +0530 Subject: [PATCH 1/9] Container image Signed-off-by: monusingh-1 --- .github/workflows/build.yml | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e4d54e4..7994cd99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,66 @@ on: # We build for other platforms except linux which is already covered in build-and-test. # Also, We're not running tests here as those are already covered with linux build. jobs: + Get-CI-Image-Tag: + runs-on: ubuntu-latest + outputs: + ci-image-version-linux: ${{ steps.step-ci-image-version-linux.outputs.ci-image-version-linux }} + steps: + - name: Install crane + uses: iarekylew00t/crane-installer@v1 + with: + crane-release: v0.15.2 + - name: Checkout opensearch-build repository + uses: actions/checkout@v2 + with: + repository: 'opensearch-project/opensearch-build' + ref: 'main' + path: 'opensearch-build' + - name: Get ci image version from opensearch-build repository scripts + id: step-ci-image-version-linux + run: | + crane version + CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p centos7 -u opensearch -t build | head -1` + echo $CI_IMAGE_VERSION + echo "ci-image-version-linux=$CI_IMAGE_VERSION" >> $GITHUB_OUTPUT + + Build-CCR-Linux: + strategy: + matrix: + java: [11, 17] + + name: Build and Test CCR Plugin on Linux + runs-on: ubuntu-latest + needs: Get-CI-Image-Tag + container: + # using the same image which is used by opensearch-build team to build the OpenSearch Distribution + # this image tag is subject to change as more dependencies and updates will arrive over time + image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} + # need to switch to root so that github actions can install runner binary on container without permission issues. + options: --user root + + steps: + - name: Checkout CCR + uses: actions/checkout@v1 + with: + submodules: true + + - name: Setup Java ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + + - name: Run build + # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. + run: | + chown -R opensearch.opensearch `pwd` + su opensearch -c "whoami && java -version && ./gradlew build" + + - name: Upload Coverage Report + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + build: continue-on-error: true strategy: From c85a282ef2e8edf4ca357245888f0e15158d9fb9 Mon Sep 17 00:00:00 2001 From: monusingh-1 Date: Fri, 13 Oct 2023 12:20:09 +0530 Subject: [PATCH 2/9] update test workflow Signed-off-by: monusingh-1 --- .github/workflows/build-and-test.yml | 66 +++++++++++++++++++++------- .github/workflows/build.yml | 2 +- 2 files changed, 50 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4a257534..29053c40 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -10,28 +10,60 @@ on: # We build for all combinations but run tests only on one combination (linux & latest java) jobs: - build: - continue-on-error: true + Get-CI-Image-Tag: + runs-on: ubuntu-latest + outputs: + ci-image-version-linux: ${{ steps.step-ci-image-version-linux.outputs.ci-image-version-linux }} + steps: + - name: Install crane + uses: iarekylew00t/crane-installer@v1 + with: + crane-release: v0.15.2 + - name: Checkout opensearch-build repository + uses: actions/checkout@v2 + with: + repository: 'opensearch-project/opensearch-build' + ref: 'main' + path: 'opensearch-build' + - name: Get ci image version from opensearch-build repository scripts + id: step-ci-image-version-linux + run: | + crane version + CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p centos7 -u opensearch -t build | head -1` + echo $CI_IMAGE_VERSION + echo "ci-image-version-linux=$CI_IMAGE_VERSION" >> $GITHUB_OUTPUT + + Build-Test-CCR-Linux: strategy: matrix: - java: - - 11 - - 17 - # Job name - name: Run integration tests on linux with Java ${{ matrix.java }} + java: [11, 17] + + name: Build and Test CCR Plugin on Linux runs-on: ubuntu-latest + needs: Get-CI-Image-Tag + container: + # using the same image which is used by opensearch-build team to build the OpenSearch Distribution + # this image tag is subject to change as more dependencies and updates will arrive over time + image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} + # need to switch to root so that github actions can install runner binary on container without permission issues. + options: --user root + steps: - # This step uses the setup-java Github action: https://github.com/actions/setup-java - - name: Set Up JDK ${{ matrix.java }} + - name: Checkout CCR + uses: actions/checkout@v1 + with: + submodules: true + + - name: Setup Java ${{ matrix.java }} uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} - # This step uses the checkout Github action: https://github.com/actions/checkout - - name: Checkout Branch - uses: actions/checkout@v2 - - name: Build and run Replication tests + + - name: Run build + # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. run: | - ./gradlew --refresh-dependencies clean release -D"build.snapshot=true" + chown -R opensearch.opensearch `pwd` + su opensearch -c "whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true" - name: Upload failed logs uses: actions/upload-artifact@v2 if: failure() @@ -45,7 +77,7 @@ jobs: run: | mkdir -p cross-cluster-replication-artifacts cp ./build/distributions/*.zip cross-cluster-replication-artifacts - - name: Uploads coverage + - name: Upload Coverage Report + uses: codecov/codecov-action@v1 with: - fetch-depth: 2 - uses: codecov/codecov-action@v1.2.1 + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7994cd99..74d1bff2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,7 +64,7 @@ jobs: # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. run: | chown -R opensearch.opensearch `pwd` - su opensearch -c "whoami && java -version && ./gradlew build" + su opensearch -c "whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true" -x test -x IntegTest" - name: Upload Coverage Report uses: codecov/codecov-action@v1 From 942ae9129d2b794004abff75d64cb266d62c24ee Mon Sep 17 00:00:00 2001 From: monusingh-1 Date: Fri, 13 Oct 2023 13:02:55 +0530 Subject: [PATCH 3/9] Fix failure Signed-off-by: monusingh-1 --- .github/workflows/build-and-test.yml | 6 +++--- .github/workflows/build.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 29053c40..a76d41a4 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -38,7 +38,7 @@ jobs: matrix: java: [11, 17] - name: Build and Test CCR Plugin on Linux + name: Build CCR Plugin on Linux using Container Image runs-on: ubuntu-latest needs: Get-CI-Image-Tag container: @@ -50,7 +50,7 @@ jobs: steps: - name: Checkout CCR - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: submodules: true @@ -63,7 +63,7 @@ jobs: # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. run: | chown -R opensearch.opensearch `pwd` - su opensearch -c "whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true" + su opensearch -c "whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true"" - name: Upload failed logs uses: actions/upload-artifact@v2 if: failure() diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74d1bff2..f097fbad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,7 @@ jobs: steps: - name: Checkout CCR - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: submodules: true From 3f2b4e1b9f398101337d975eb1891b9ba984cfc6 Mon Sep 17 00:00:00 2001 From: monusingh-1 Date: Fri, 13 Oct 2023 13:21:46 +0530 Subject: [PATCH 4/9] Fix failure Signed-off-by: monusingh-1 --- .github/workflows/build-and-test.yml | 3 --- .github/workflows/build.yml | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a76d41a4..1f762ae1 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -51,9 +51,6 @@ jobs: steps: - name: Checkout CCR uses: actions/checkout@v2 - with: - submodules: true - - name: Setup Java ${{ matrix.java }} uses: actions/setup-java@v1 with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f097fbad..2679988b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: with: crane-release: v0.15.2 - name: Checkout opensearch-build repository - uses: actions/checkout@v2 + uses: actions/checkout@v1 with: repository: 'opensearch-project/opensearch-build' ref: 'main' @@ -52,9 +52,6 @@ jobs: steps: - name: Checkout CCR uses: actions/checkout@v2 - with: - submodules: true - - name: Setup Java ${{ matrix.java }} uses: actions/setup-java@v1 with: From b2a7594bd9b0f99a7e65cb37d0e305241c0e4951 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 13 Oct 2023 16:42:17 -0400 Subject: [PATCH 5/9] Simplify process and remove dco yml as it is replaced by dco app Signed-off-by: Peter Zhu --- .github/workflows/build-and-test.yml | 30 ++++---------------- .github/workflows/build.yml | 32 +++++----------------- .github/workflows/dco-check.yml | 18 ------------ .github/workflows/security-knn-tests.yml | 35 +++++++++++++++++++----- 4 files changed, 41 insertions(+), 74 deletions(-) delete mode 100644 .github/workflows/dco-check.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 1f762ae1..ee3c934a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -11,29 +11,11 @@ on: # We build for all combinations but run tests only on one combination (linux & latest java) jobs: Get-CI-Image-Tag: - runs-on: ubuntu-latest - outputs: - ci-image-version-linux: ${{ steps.step-ci-image-version-linux.outputs.ci-image-version-linux }} - steps: - - name: Install crane - uses: iarekylew00t/crane-installer@v1 - with: - crane-release: v0.15.2 - - name: Checkout opensearch-build repository - uses: actions/checkout@v2 - with: - repository: 'opensearch-project/opensearch-build' - ref: 'main' - path: 'opensearch-build' - - name: Get ci image version from opensearch-build repository scripts - id: step-ci-image-version-linux - run: | - crane version - CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p centos7 -u opensearch -t build | head -1` - echo $CI_IMAGE_VERSION - echo "ci-image-version-linux=$CI_IMAGE_VERSION" >> $GITHUB_OUTPUT + uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main + with: + product: opensearch - Build-Test-CCR-Linux: + build-test-linux: strategy: matrix: java: [11, 17] @@ -60,7 +42,7 @@ jobs: # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. run: | chown -R opensearch.opensearch `pwd` - su opensearch -c "whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true"" + su `id -un 1000` -c 'whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true"' - name: Upload failed logs uses: actions/upload-artifact@v2 if: failure() @@ -77,4 +59,4 @@ jobs: - name: Upload Coverage Report uses: codecov/codecov-action@v1 with: - token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2679988b..7a5c36bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,29 +12,11 @@ on: # Also, We're not running tests here as those are already covered with linux build. jobs: Get-CI-Image-Tag: - runs-on: ubuntu-latest - outputs: - ci-image-version-linux: ${{ steps.step-ci-image-version-linux.outputs.ci-image-version-linux }} - steps: - - name: Install crane - uses: iarekylew00t/crane-installer@v1 - with: - crane-release: v0.15.2 - - name: Checkout opensearch-build repository - uses: actions/checkout@v1 - with: - repository: 'opensearch-project/opensearch-build' - ref: 'main' - path: 'opensearch-build' - - name: Get ci image version from opensearch-build repository scripts - id: step-ci-image-version-linux - run: | - crane version - CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p centos7 -u opensearch -t build | head -1` - echo $CI_IMAGE_VERSION - echo "ci-image-version-linux=$CI_IMAGE_VERSION" >> $GITHUB_OUTPUT + uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main + with: + product: opensearch - Build-CCR-Linux: + build-linux: strategy: matrix: java: [11, 17] @@ -60,8 +42,8 @@ jobs: - name: Run build # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. run: | - chown -R opensearch.opensearch `pwd` - su opensearch -c "whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true" -x test -x IntegTest" + chown -R 1000:1000 `pwd` + su `id -un 1000` -c 'whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true" -x test -x IntegTest' - name: Upload Coverage Report uses: codecov/codecov-action@v1 @@ -91,4 +73,4 @@ jobs: uses: actions/checkout@v2 - name: Build and run Replication tests run: | - ./gradlew --refresh-dependencies clean release -D"build.snapshot=true" -x test -x IntegTest \ No newline at end of file + ./gradlew --refresh-dependencies clean release -D"build.snapshot=true" -x test -x IntegTest diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml deleted file mode 100644 index cf30ea89..00000000 --- a/.github/workflows/dco-check.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Developer Certificate of Origin Check - -on: [pull_request] - -jobs: - check: - runs-on: ubuntu-latest - - steps: - - name: Get PR Commits - id: 'get-pr-commits' - uses: tim-actions/get-pr-commits@v1.1.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: DCO Check - uses: tim-actions/dco@v1.1.0 - with: - commits: ${{ steps.get-pr-commits.outputs.commits }} diff --git a/.github/workflows/security-knn-tests.yml b/.github/workflows/security-knn-tests.yml index 45d4e898..afc358e5 100644 --- a/.github/workflows/security-knn-tests.yml +++ b/.github/workflows/security-knn-tests.yml @@ -9,6 +9,11 @@ on: - '*' jobs: + Get-CI-Image-Tag: + uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main + with: + product: opensearch + req: # Job name name: plugin check @@ -45,12 +50,19 @@ jobs: cat $GITHUB_OUTPUT fi - build: - needs: req + build-linux: + needs: [req, Get-CI-Image-Tag] if: ${{ 'True' == needs.req.outputs.isSecurityPluginAvailable }} # Job name name: Build and Run Security tests runs-on: ubuntu-latest + container: + # using the same image which is used by opensearch-build team to build the OpenSearch Distribution + # this image tag is subject to change as more dependencies and updates will arrive over time + image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} + # need to switch to root so that github actions can install runner binary on container without permission issues. + options: --user root + steps: # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Set Up JDK 17 @@ -62,8 +74,9 @@ jobs: uses: actions/checkout@v2 - name: Build and run Replication tests run: | + chown -R 1000:1000 `pwd` ls -al src/test/resources/security/plugin - ./gradlew --refresh-dependencies clean release -Dbuild.snapshot=true -Psecurity=true + su `id -un 1000` -c "whoami && java -version && ./gradlew --refresh-dependencies clean release -Dbuild.snapshot=true -Psecurity=true" - name: Upload failed logs uses: actions/upload-artifact@v2 if: failure() @@ -82,12 +95,19 @@ jobs: fetch-depth: 2 uses: codecov/codecov-action@v1.2.1 - knn-build: - needs: req + knn-build-linux: + needs: [req, Get-CI-Image-Tag] if: ${{ 'True' == needs.req.outputs.isKnnPluginAvailable }} # Job name name: Build and Run Knn tests runs-on: ubuntu-latest + container: + # using the same image which is used by opensearch-build team to build the OpenSearch Distribution + # this image tag is subject to change as more dependencies and updates will arrive over time + image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} + # need to switch to root so that github actions can install runner binary on container without permission issues. + options: --user root + steps: # This step uses the setup-java Github action: https://github.com/actions/setup-java - name: Set Up JDK 17 @@ -99,7 +119,8 @@ jobs: uses: actions/checkout@v2 - name: Build and run Replication tests run: | - ./gradlew --refresh-dependencies clean release -Dbuild.snapshot=true -PnumNodes=1 -Dtests.class=org.opensearch.replication.BasicReplicationIT -Dtests.method="test knn index replication" -Pknn=true + chown -R opensearch.opensearch `pwd` + su `id -un 1000` -c 'whoami && java -version && ./gradlew --refresh-dependencies clean release -Dbuild.snapshot=true -PnumNodes=1 -Dtests.class=org.opensearch.replication.BasicReplicationIT -Dtests.method="test knn index replication" -Pknn=true' - name: Upload failed logs uses: actions/upload-artifact@v2 if: failure() @@ -116,4 +137,4 @@ jobs: - name: Uploads coverage with: fetch-depth: 2 - uses: codecov/codecov-action@v1.2.1 \ No newline at end of file + uses: codecov/codecov-action@v1.2.1 From 8b35b39c205751770a4f3cd34f701332e416926c Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 13 Oct 2023 16:43:09 -0400 Subject: [PATCH 6/9] tweak more Signed-off-by: Peter Zhu --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ee3c934a..125d13db 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -41,7 +41,7 @@ jobs: - name: Run build # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. run: | - chown -R opensearch.opensearch `pwd` + chown -R 1000:1000 `pwd` su `id -un 1000` -c 'whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true"' - name: Upload failed logs uses: actions/upload-artifact@v2 From e8f217475eb19e5a98d0565352046390bfe0ef34 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 13 Oct 2023 16:45:23 -0400 Subject: [PATCH 7/9] tweak more Signed-off-by: Peter Zhu --- .github/workflows/security-knn-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/security-knn-tests.yml b/.github/workflows/security-knn-tests.yml index afc358e5..a6b3fd9d 100644 --- a/.github/workflows/security-knn-tests.yml +++ b/.github/workflows/security-knn-tests.yml @@ -119,7 +119,7 @@ jobs: uses: actions/checkout@v2 - name: Build and run Replication tests run: | - chown -R opensearch.opensearch `pwd` + chown -R 1000:1000 `pwd` su `id -un 1000` -c 'whoami && java -version && ./gradlew --refresh-dependencies clean release -Dbuild.snapshot=true -PnumNodes=1 -Dtests.class=org.opensearch.replication.BasicReplicationIT -Dtests.method="test knn index replication" -Pknn=true' - name: Upload failed logs uses: actions/upload-artifact@v2 From 86149f81c3672ce2c319e5004c462b1237826d4f Mon Sep 17 00:00:00 2001 From: monusingh-1 Date: Tue, 17 Oct 2023 18:46:51 +0530 Subject: [PATCH 8/9] Remove workflow in build Signed-off-by: monusingh-1 --- .github/workflows/build.yml | 39 ------------------------------------- 1 file changed, 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a5c36bc..ca44eebf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,45 +11,6 @@ on: # We build for other platforms except linux which is already covered in build-and-test. # Also, We're not running tests here as those are already covered with linux build. jobs: - Get-CI-Image-Tag: - uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main - with: - product: opensearch - - build-linux: - strategy: - matrix: - java: [11, 17] - - name: Build and Test CCR Plugin on Linux - runs-on: ubuntu-latest - needs: Get-CI-Image-Tag - container: - # using the same image which is used by opensearch-build team to build the OpenSearch Distribution - # this image tag is subject to change as more dependencies and updates will arrive over time - image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} - # need to switch to root so that github actions can install runner binary on container without permission issues. - options: --user root - - steps: - - name: Checkout CCR - uses: actions/checkout@v2 - - name: Setup Java ${{ matrix.java }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java }} - - - name: Run build - # switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip. - run: | - chown -R 1000:1000 `pwd` - su `id -un 1000` -c 'whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true" -x test -x IntegTest' - - - name: Upload Coverage Report - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - build: continue-on-error: true strategy: From 121b469ff6c0b8a77a8b3e4e50abd82a7809ffbd Mon Sep 17 00:00:00 2001 From: monusingh-1 Date: Tue, 17 Oct 2023 19:33:32 +0530 Subject: [PATCH 9/9] Add dco check Signed-off-by: monusingh-1 --- .github/workflows/dco-check.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/dco-check.yml diff --git a/.github/workflows/dco-check.yml b/.github/workflows/dco-check.yml new file mode 100644 index 00000000..cf30ea89 --- /dev/null +++ b/.github/workflows/dco-check.yml @@ -0,0 +1,18 @@ +name: Developer Certificate of Origin Check + +on: [pull_request] + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - name: Get PR Commits + id: 'get-pr-commits' + uses: tim-actions/get-pr-commits@v1.1.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: DCO Check + uses: tim-actions/dco@v1.1.0 + with: + commits: ${{ steps.get-pr-commits.outputs.commits }}