diff --git a/.github/workflows/on-merge.yml b/.github/workflows/on-merge.yml index 6c703ad4..3519e1b1 100644 --- a/.github/workflows/on-merge.yml +++ b/.github/workflows/on-merge.yml @@ -1,15 +1,10 @@ -# This workflow is triggered every time a change is pushed to any branches -# Github actions command reference: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions -name: On merge to main +name: On Merge -# The workflow could also be triggered on PRs on: workflow_dispatch: push: - branches: - - "main" tags-ignore: - - "**" + - '**' permissions: actions: read @@ -22,78 +17,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} jobs: - update-signature: - name: Update module signature - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: jahia/jahia-modules-action/update-signature@v2 - with: - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - - build: - name: Build Module - needs: update-signature - runs-on: self-hosted - env: - NEXUS_INTERNAL_URL: https://devtools.jahia.com/nexus/content/groups/internal/ - container: - image: ghcr.io/jahia/jahia-docker-mvn-cache:17-jdk-noble-mvn-loaded - credentials: - username: ${{ secrets.GH_PACKAGES_USERNAME }} - password: ${{ secrets.GH_PACKAGES_TOKEN }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: jahia/jahia-modules-action/build@v2 - with: - # the test module is built as part of the Maven build - tests_module_type: "disabled" - mvn_settings_filepath: ".github/maven.settings.xml" - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - - sbom: - name: SBOM processing - needs: build - runs-on: ubuntu-latest - container: - image: cyclonedx/cyclonedx-cli:0.24.2 - steps: - - uses: jahia/jahia-modules-action/sbom-processing@v2 - with: - dependencytrack_hostname: ${{ vars.DEPENDENCYTRACK_HOSTNAME }} - dependencytrack_apikey: ${{ secrets.DEPENDENCYTRACK_APIKEY }} - sbom_artifacts: "build-artifacts" - - integration-tests-standalone: - uses: Jahia/jahia-modules-action/.github/workflows/reusable-integration-tests.yml@v2 - needs: build + merge: + uses: Jahia/jahia-modules-action/.github/workflows/reusable-module-on-merge.yml@reusable-module-workflows secrets: inherit - with: - jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT - module_id: javascript-modules-engine - testrail_project: Javascript Modules Engine - module_branch: ${{ github.ref }} - provisioning_manifest: provisioning-manifest-build.yml - artifact_prefix: js-eng - - publish: - name: Publish module - needs: [integration-tests-standalone] - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - container: - image: ghcr.io/jahia/jahia-docker-mvn-cache:17-jdk-noble-mvn-loaded - credentials: - username: ${{ secrets.GH_PACKAGES_USERNAME }} - password: ${{ secrets.GH_PACKAGES_TOKEN }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: jahia/jahia-modules-action/publish@v2 - with: - # the test module is built as part of the Maven build - tests_module_type: "disabled" - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - mvn_settings_filepath: ".github/maven.settings.xml" diff --git a/.github/workflows/on-code-change.yml b/.github/workflows/on-pull-request.yml similarity index 74% rename from .github/workflows/on-code-change.yml rename to .github/workflows/on-pull-request.yml index 8b7f5a32..2185d557 100644 --- a/.github/workflows/on-code-change.yml +++ b/.github/workflows/on-pull-request.yml @@ -1,6 +1,6 @@ # This workflow is triggered every time a change is pushed to any branches # Github actions command reference: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions -name: On Code Change +name: On Pull Request # The workflow could also be triggered on PRs on: @@ -13,16 +13,10 @@ on: - "docs/**" jobs: - on-code-change: - uses: Jahia/jahia-modules-action/.github/workflows/reusable-on-code-change.yml@v2 + pull-request: + uses: Jahia/jahia-modules-action/.github/workflows/reusable-module-on-pull-request.yml@reusable-module-workflows secrets: inherit - with: - module_id: javascript-modules-engine - build_container_image: ghcr.io/jahia/jahia-docker-mvn-cache:17-jdk-noble-mvn-loaded - integration_tests_provisioning_manifest: provisioning-manifest-build.yml - integration_tests_testrail_project: Javascript Modules Engine - # This workflow ensures that Windows builds are exactly the same as on other platforms test-on-windows: name: Test on Windows runs-on: windows-latest diff --git a/.jahia.yml b/.jahia.yml new file mode 100644 index 00000000..07e48869 --- /dev/null +++ b/.jahia.yml @@ -0,0 +1,3 @@ +repository: + tests: + testrail-project: Javascript Modules Engine diff --git a/mise.toml b/mise.toml index 6efbe883..6a91d2da 100644 --- a/mise.toml +++ b/mise.toml @@ -1,3 +1,4 @@ [tools] +java = "temurin-17" node = "26" yarn = "4.18"