Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/custom-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Manual deployments for custom projects, must be called from a workflow_dispatch workflow
name: Custom deploy

on:
workflow_call:
inputs:
INPUTS:
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
deployment:
name: Deployment
uses: "./.github/workflows/deployment.yml"
with:
INPUTS: ${{ inputs.INPUTS }}
COMMIT: ${{ fromJSON(inputs.INPUTS || '{}').COMMIT }}
secrets: inherit
28 changes: 28 additions & 0 deletions .github/workflows/custom-install-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Custom Install Dist

on:
workflow_call:
inputs:
skip:
type: boolean
description: Skip condition to allow branch protection checks to pass
default: false

jobs:
install-dist:
name: Install Dist
if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up JDK 21 and Gradle cache
uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: "temurin"
java-version: "21"
cache: "gradle"

- name: Run Install Dist
timeout-minutes: 20
run: ./gradlew installDist
2 changes: 1 addition & 1 deletion .github/workflows/custom-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
name: Build
needs: detect-changes
if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/install-dist.yml"
uses: "./.github/workflows/custom-install-dist.yml"
with:
skip: ${{ needs.detect-changes.outputs.any_modified != 'true' }}

Expand Down
33 changes: 28 additions & 5 deletions .github/workflows/custom-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
backend_spotless_any_modified: ${{ steps.changed-files.outputs.backend_spotless_any_modified }}
ui_any_modified: ${{ steps.changed-files.outputs.ui_any_modified }}
ui_spotless_any_modified: ${{ steps.changed-files.outputs.ui_spotless_any_modified }}
# Processed ci_cd.json outputs
deploys: ${{ steps.ci-cd-output.outputs.deploys }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down Expand Up @@ -56,6 +58,23 @@ jobs:
- 'ui/**/*.{cjs,css,cts,gradle,html,js,json,jsonc,jsx,md,mdx,mjs,mts,ts,tsx}'
- 'ui/.prettierignore'

- name: Get version details
id: get-version-details
uses: openremote/core/.github/actions/get-version-details@3cde448ab3d2e825e7ab189881d0e6cf33a34486

- name: Check if core repo
id: is_core_repo
uses: openremote/core/.github/actions/check-if-core-repo@357f1387fbc99e7a59752a62064f0bdade57612d

- name: Process ci_cd.json file
id: ci-cd-output
uses: openremote/core/.github/actions/process-cicd-json@357f1387fbc99e7a59752a62064f0bdade57612d
with:
IS_CORE_REPO: ${{ steps.is_core_repo.outputs.value }}
MANAGER_VERSION: ${{ steps.is_core_repo.outputs.version }}
IS_RELEASE: ${{ steps.get-version-details.outputs.is_release }}
VERSION: ${{ steps.get-version-details.outputs.version }}

check-spotless:
name: Lint
needs: detect-changes
Expand All @@ -75,7 +94,7 @@ jobs:
install-dist:
name: Build
needs: detect-changes
uses: "./.github/workflows/install-dist.yml"
uses: "./.github/workflows/custom-install-dist.yml"

unit-tests:
name: Test
Expand All @@ -101,7 +120,11 @@ jobs:
# with:
# skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}

# deployment:
# name: Deploy
# needs: [unit-tests, integration-tests]
# uses: "./.github/workflows/deployment.yml"
deployment:
name: Deploy
needs: [detect-changes, install-dist, unit-tests, integration-tests]
if: ${{ !failure() && !cancelled() && needs.detect-changes.outputs.deploys != '' }}
uses: "./.github/workflows/deployment.yml"
with:
INPUTS: ${{ inputs.INPUTS }}
secrets: inherit
6 changes: 6 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
sparse-checkout: .ci_cd
sparse-checkout-cone-mode: false

# Compatibility with released scripts
- name: Provide legacy core repo checkout path
if: ${{ steps.is_core_repo.outputs.value == 'false' }}
run: ln -s core openremote

- name: Process ci_cd.json file
id: ci-cd-output
uses: openremote/core/.github/actions/process-cicd-json@357f1387fbc99e7a59752a62064f0bdade57612d
Expand Down Expand Up @@ -325,6 +330,7 @@ jobs:
sys.exit(1)
env:
IS_CORE_REPO: ${{ steps.is_core_repo.outputs.value }}
IS_MAIN_REPO: ${{ steps.is_core_repo.outputs.value }} # Compatibility with released scripts
DEPLOYMENTS: ${{ steps.deployments.outputs.value }}
BUILDX_BUILDER: ${{ steps.buildx.outputs.name }}
MANAGER_DOCKER_BUILD_PATH: manager/build/install/manager
Expand Down
Loading