Repository navigation
Update custom project workflow files #3441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ekhorn
wants to merge
3
commits into
main
Choose a base branch
from
ci/custom-projects
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -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] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The deployment job doesn't depend on |
||
| if: ${{ !failure() && !cancelled() && needs.detect-changes.outputs.deploys != '' }} | ||
| uses: "./.github/workflows/deployment.yml" | ||
| with: | ||
| INPUTS: ${{ inputs.INPUTS }} | ||
| secrets: inherit | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
custom-install-dist.ymlincludes the deployment build, butany_modifiedstill excludesdeployment/**. Consequently, deployment-only changes won't trigger the build. Could the change detection be extended to cover those files as well?