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..861f5982c 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -21,12 +21,18 @@ on: push: branches: - main - + 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: contents: read + + unit-tests: + uses: ./.github/workflows/_test.yml + + docs-build: + 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