From c0bba59abaf344e4446179282de09675871def67 Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Wed, 5 Aug 2026 03:08:19 +0200 Subject: [PATCH 1/2] ci: use new secure docs workflow --- .github/workflows/{test.yml => _test.yml} | 2 - .github/workflows/docs-publish.yml | 30 ++++++++++++ .github/workflows/on-pr.yml | 13 ++++- .github/workflows/test_and_docs.yml | 60 ----------------------- 4 files changed, 42 insertions(+), 63 deletions(-) rename .github/workflows/{test.yml => _test.yml} (97%) create mode 100644 .github/workflows/docs-publish.yml delete mode 100644 .github/workflows/test_and_docs.yml diff --git a/.github/workflows/test.yml b/.github/workflows/_test.yml similarity index 97% rename from .github/workflows/test.yml rename to .github/workflows/_test.yml index c4eeec519..54a7a6e33 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/_test.yml @@ -13,8 +13,6 @@ name: Run Bazel Tests on: - pull_request: - types: [opened, reopened, synchronize] workflow_call: jobs: code: diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml new file mode 100644 index 000000000..a045828cf --- /dev/null +++ b/.github/workflows/docs-publish.yml @@ -0,0 +1,30 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +name: Publish Documentation + +on: + workflow_run: + workflows: ["PR Checks"] + types: [completed] + +jobs: + docs-deploy: + if: github.event.workflow_run.conclusion == 'success' + uses: eclipse-score/cicd-workflows/.github/workflows/docs-publish.yml@206a795e30d45de82d541206fde17abe98d2b4bf + permissions: + actions: read + contents: write + id-token: write + pages: write + pull-requests: write diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index ef5e5a95e..b6ad32722 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -21,7 +21,10 @@ on: push: branches: - main - + tags: + - "v*" + release: + types: [published] jobs: # Common S-CORE Workflow @@ -30,3 +33,11 @@ jobs: uses: eclipse-score/cicd-workflows/.github/workflows/on-pr.yml@88cb460c47cb49efeb25cd7b73c8945dd1c5bce2 # on-pr/v0.0.0 permissions: contents: read + + unit-tests: + uses: ./.github/workflows/_test.yml + + docs-build: + # Waits for consumer-tests but run only when docs verification succeeded + needs: [unit-tests] + uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@206a795e30d45de82d541206fde17abe98d2b4bf diff --git a/.github/workflows/test_and_docs.yml b/.github/workflows/test_and_docs.yml deleted file mode 100644 index aecf8a289..000000000 --- a/.github/workflows/test_and_docs.yml +++ /dev/null @@ -1,60 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0 -# -# SPDX-License-Identifier: Apache-2.0 -# ******************************************************************************* - -name: Tests, Verify and Build Docs - -permissions: - contents: write - pages: write - pull-requests: write - id-token: write - -on: - pull_request_target: - types: [opened, reopened, synchronize] # Allows forks to trigger the docs build - push: - branches: - - main - merge_group: - types: [checks_requested] - release: - types: [created] - -jobs: - docs-verify: - uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0 - permissions: - pull-requests: write - contents: read - with: - bazel-docs-verify-target: "--lockfile_mode=error //:docs_check" - - # This is the user configurable part of the workflow - unit-tests: - uses: ./.github/workflows/test.yml - secrets: inherit - - docs-build: - # Waits for consumer-tests but run only when docs verification succeeded - needs: [docs-verify, unit-tests] - if: ${{ always() && needs.docs-verify.result == 'success' }} - uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0 - permissions: - contents: write - pages: write - pull-requests: write - id-token: write - with: - bazel-target: "//:docs" - retention-days: 3 - tests-report-artifact: tests-report From 2bd4fca2a108bb04a5944e2a6208478845e4508c Mon Sep 17 00:00:00 2001 From: Alexander Lanin Date: Wed, 5 Aug 2026 11:10:03 +0200 Subject: [PATCH 2/2] fix review findings --- .github/workflows/on-pr.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index b6ad32722..861f5982c 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -21,14 +21,10 @@ on: push: branches: - main - tags: - - "v*" release: types: [published] jobs: - # Common S-CORE Workflow - common: uses: eclipse-score/cicd-workflows/.github/workflows/on-pr.yml@88cb460c47cb49efeb25cd7b73c8945dd1c5bce2 # on-pr/v0.0.0 permissions: @@ -38,6 +34,5 @@ jobs: uses: ./.github/workflows/_test.yml docs-build: - # Waits for consumer-tests but run only when docs verification succeeded needs: [unit-tests] uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@206a795e30d45de82d541206fde17abe98d2b4bf