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

imbajin pushed a commit to branch feat/oink-core-platform
in repository https://gitbox.apache.org/repos/asf/hugegraph-doc.git

commit 79d12ba528c6e13711aed831cae86d6828c99d2b
Author: dark <[email protected]>
AuthorDate: Fri Sep 4 22:24:57 2026 +0800

    fix(ci): serialize ASF target writers
    
    - group production runs by the asf-site target
    - isolate staging and pull request concurrency
    - guard the target-level concurrency contract
---
 .github/workflows/hugo.yml           |  2 +-
 tests/e2e/workflow-contract.test.cjs | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml
index cd9db3154..4e72371d4 100644
--- a/.github/workflows/hugo.yml
+++ b/.github/workflows/hugo.yml
@@ -28,7 +28,7 @@ on:
         type: string
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.operation || 
'automatic' }}
+  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && 
format('pr-{0}', github.event.pull_request.number) || (inputs.operation == 
'staging-next' && 'asf-staging-oink' || 'asf-site') }}
   cancel-in-progress: true
 
 env:
diff --git a/tests/e2e/workflow-contract.test.cjs 
b/tests/e2e/workflow-contract.test.cjs
index 179e6f74a..45bf171d2 100644
--- a/tests/e2e/workflow-contract.test.cjs
+++ b/tests/e2e/workflow-contract.test.cjs
@@ -32,6 +32,17 @@ test("event plan fixes origins, branches, confirmations, and 
five-version order"
   assert.doesNotMatch(workflow, /permissions:\s*write-all/);
 });
 
+test("concurrency serializes every writer to the same ASF target", () => {
+  assert.match(
+    workflow,
+    /group: \$\{\{ github\.workflow \}\}-\$\{\{[\s\S]*inputs\.operation == 
'staging-next'[\s\S]*'asf-staging-oink'[\s\S]*'asf-site'[\s\S]*\}\}/
+  );
+  assert.doesNotMatch(
+    workflow,
+    /group:[^\n]*(?:inputs\.operation \|\| 'automatic'|github\.ref)/
+  );
+});
+
 test("prepare pins Hugo and WebP tools before source validators", () => {
   const setupHugo = workflow.indexOf("name: Setup Hugo Extended");
   const setupWebp = workflow.indexOf("name: Install WebP validators");

Reply via email to