This is an automated email from the ASF dual-hosted git repository.

shuke987 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-kafka-connector.git


The following commit(s) were added to refs/heads/master by this push:
     new 79d92d2  [Chore] Harden GitHub Actions and protect release branches 
(#116)
79d92d2 is described below

commit 79d92d2d0514cbc7505b181d30dc8d7e7e5c7056
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Thu Nov 26 20:15:08 2026 +0800

    [Chore] Harden GitHub Actions and protect release branches (#116)
    
    * [Chore] Harden GitHub Actions and protect release branches
    * [Test] Use the Doris MinIO test image mirror
    * [Chore] Require the connector end-to-end check on master
    * [Chore] Allow merging with open review conversations
---
 .asf.yaml                                          | 29 +++++++++++++++++++++-
 .github/workflows/build-doris-kafka-connector.yml  | 13 +++++++---
 .github/workflows/checkstyle.yaml                  | 12 ++++++---
 .github/workflows/kafka2doris-e2ecase.yaml         | 11 +++++---
 .github/workflows/license-eyes.yml                 | 14 +++++++----
 .licenserc.yaml                                    |  3 ++-
 pom.xml                                            |  2 +-
 .../kafka/connector/e2e/sink/S3TvfSinkITCase.java  |  5 +++-
 8 files changed, 69 insertions(+), 20 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 41743b5..c54e1ab 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -34,11 +34,38 @@ github:
     squash:  true
     merge:   false
     rebase:  false
+
+  # Keep the existing classic protection on master during ruleset rollout.
   protected_branches:
     master:
       required_pull_request_reviews:
         dismiss_stale_reviews: true
-        required_approving_review_count: 0
+        required_approving_review_count: 1
+      required_status_checks:
+        strict: false
+        checks:
+          - context: Build Doris Kafka Connector
+            app_id: 15368
+          - context: CheckStyle
+            app_id: 15368
+          - context: License Check
+            app_id: 15368
+          - context: e2e test case
+            app_id: 15368
+
+  rulesets:
+    - name: Default and release branch protection
+      type: branch
+      branches:
+        includes:
+          - '~DEFAULT_BRANCH'
+          - 'release-*'
+      restrict_deletion: true
+      restrict_force_push: true
+      required_pull_request_reviews:
+        dismiss_stale_reviews: true
+        required_approving_review_count: 1
+
   features:
     issues: true
     projects: true
diff --git a/.github/workflows/build-doris-kafka-connector.yml 
b/.github/workflows/build-doris-kafka-connector.yml
index f54a248..670d3fb 100644
--- a/.github/workflows/build-doris-kafka-connector.yml
+++ b/.github/workflows/build-doris-kafka-connector.yml
@@ -23,6 +23,9 @@ on:
   pull_request:
   push:
 
+permissions:
+  contents: read
+
 jobs:
   build-extension:
     name: "Build Doris Kafka Connector"
@@ -32,14 +35,16 @@ jobs:
         shell: bash
     steps:
       - name: Checkout
-        uses: actions/checkout@master
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
+        with:
+          persist-credentials: false
 
       - name: Setup java
-        uses: actions/setup-java@v2
+        uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # 
v6.3.0
         with:
-          distribution: adopt
+          distribution: temurin
           java-version: '8'
 
       - name: Build Doris Kafka Connector
         run: |
-          mvn clean package
\ No newline at end of file
+          mvn clean package
diff --git a/.github/workflows/checkstyle.yaml 
b/.github/workflows/checkstyle.yaml
index 4401ab8..d6b28bd 100644
--- a/.github/workflows/checkstyle.yaml
+++ b/.github/workflows/checkstyle.yaml
@@ -24,23 +24,27 @@ on:
   push:
     branches:
       - master
+
+permissions:
+  contents: read
+
 jobs:
   java-checkstyle:
     name: "CheckStyle"
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
         with:
           persist-credentials: false
           submodules: recursive
 
       - name: Setup java
-        uses: actions/setup-java@v2
+        uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # 
v6.3.0
         with:
-          distribution: adopt
+          distribution: temurin
           java-version: '8'
 
       - name: Run java checkstyle
         run:
-           mvn spotless:check
\ No newline at end of file
+           mvn spotless:check
diff --git a/.github/workflows/kafka2doris-e2ecase.yaml 
b/.github/workflows/kafka2doris-e2ecase.yaml
index f293340..4cebaaf 100644
--- a/.github/workflows/kafka2doris-e2ecase.yaml
+++ b/.github/workflows/kafka2doris-e2ecase.yaml
@@ -22,6 +22,9 @@ on:
   pull_request:
   push:
 
+permissions:
+  contents: read
+
 jobs:
   build-extension:
     name: "e2e test case"
@@ -31,12 +34,14 @@ jobs:
         shell: bash
     steps:
       - name: Checkout
-        uses: actions/checkout@master
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
+        with:
+          persist-credentials: false
 
       - name: Setup java
-        uses: actions/setup-java@v2
+        uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # 
v6.3.0
         with:
-          distribution: adopt
+          distribution: temurin
           java-version: '8'
 
       - name: Configure Doris prerequisites
diff --git a/.github/workflows/license-eyes.yml 
b/.github/workflows/license-eyes.yml
index ba0c303..a2f6fd3 100644
--- a/.github/workflows/license-eyes.yml
+++ b/.github/workflows/license-eyes.yml
@@ -24,17 +24,21 @@ on:
     branches:
       - master
 
+permissions:
+  contents: read
+
 jobs:
   license-check:
     name: "License Check"
     runs-on: ubuntu-latest
     steps:
       - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
-        uses: actions/checkout@v2
+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 
v7.0.1
+        with:
+          persist-credentials: false
 
       - name: Check License
-        uses: apache/[email protected]
+        uses: 
apache/skywalking-eyes/header@a196742f472feaffafea537ce5a2a4c3c53a8de4 # v0.9.0
         with:
-          config-path: ./.licenserc.yaml
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          config: .licenserc.yaml
+          token: ''
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 5c24eb6..180c5d1 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -23,10 +23,11 @@ header:
 
   paths-ignore:
     - 'LICENSE'
+    - 'NOTICE.txt'
     - '.gitignore'
     - 'config/archive/**'
     - 'src/test/resources/decode/avro/**'
     - 'src/test/resources/e2e/**'
     - 'src/test/resources/tls/**'
 
-  comment: on-failure
+  comment: never
diff --git a/pom.xml b/pom.xml
index 08ae6fa..1304228 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,7 +91,7 @@
         <httpcomponents.version>4.5.13</httpcomponents.version>
         <commons-io.version>2.3</commons-io.version>
         <geometry.version>2.2.0</geometry.version>
-        <testcontainers.version>1.17.6</testcontainers.version>
+        <testcontainers.version>1.21.4</testcontainers.version>
         <awssdk.version>2.29.52</awssdk.version>
     </properties>
 
diff --git 
a/src/test/java/org/apache/doris/kafka/connector/e2e/sink/S3TvfSinkITCase.java 
b/src/test/java/org/apache/doris/kafka/connector/e2e/sink/S3TvfSinkITCase.java
index 73d0f35..6ccfe43 100644
--- 
a/src/test/java/org/apache/doris/kafka/connector/e2e/sink/S3TvfSinkITCase.java
+++ 
b/src/test/java/org/apache/doris/kafka/connector/e2e/sink/S3TvfSinkITCase.java
@@ -63,7 +63,10 @@ import 
software.amazon.awssdk.services.s3.model.CreateBucketRequest;
 import software.amazon.awssdk.services.s3.model.ListObjectsV2Request;
 
 public class S3TvfSinkITCase extends AbstractStringE2ESinkTest {
-    private static final String MINIO_IMAGE = 
"quay.io/minio/minio:RELEASE.2024-10-13T13-34-11Z";
+    // MinIO RELEASE.2025-01-20T14-49-07Z from the Apache Doris test image 
mirror.
+    private static final String MINIO_IMAGE =
+            "doristhirdpartydocker/minio"
+                    + 
"@sha256:ed9be66eb5f2636c18289c34c3b725ddf57815f2777c77b5938543b78a44f144";
     private static final int MINIO_PORT = 9000;
     private static final String ACCESS_KEY = "minioadmin";
     private static final String SECRET_KEY = "minioadmin";


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to