Skip to content

Commit

Permalink
Derive node version from nvmrc
Browse files Browse the repository at this point in the history
andrewrlee committed Dec 6, 2024
1 parent 475861b commit f5a3e6e
Showing 3 changed files with 17 additions and 16 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -25,34 +25,34 @@ jobs:
# main node build workflow
node_build:
name: node build
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_build.yml@v1 # WORKFLOW_VERSION
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_build.yml@alee/derive-node-version # WORKFLOW_VERSION
secrets: inherit
# generic node unit tests - feel free to override with local tests if required
node_unit_tests:
name: node unit tests
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_unit_tests.yml@v1 # WORKFLOW_VERSION
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_unit_tests.yml@alee/derive-node-version # WORKFLOW_VERSION
needs: [node_build]
secrets: inherit
# generic node integration tests using wiremock - feel free to override with local tests if required
node_integration_tests:
name: node integration tests
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_integration_tests.yml@v1 # WORKFLOW_VERSION
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_integration_tests.yml@alee/derive-node-version # WORKFLOW_VERSION
needs: [node_build]
secrets: inherit
helm_lint:
strategy:
matrix:
environments: ['dev','preprod','prod']
name: helm lint
uses: ministryofjustice/hmpps-github-actions/.github/workflows/test_helm_lint.yml@v1 # WORKFLOW_VERSION
uses: ministryofjustice/hmpps-github-actions/.github/workflows/test_helm_lint.yml@alee/derive-node-version # WORKFLOW_VERSION
secrets: inherit
with:
environment: ${{ matrix.environments }}
build:
name: Build docker image from hmpps-github-actions
if: github.ref == 'refs/heads/main'
uses: ministryofjustice/hmpps-github-actions/.github/workflows/docker_build.yml@v1 # WORKFLOW_VERSION
needs:
uses: ministryofjustice/hmpps-github-actions/.github/workflows/docker_build.yml@alee/derive-node-version # WORKFLOW_VERSION
needs:
- node_integration_tests
- node_unit_tests
with:
@@ -62,32 +62,32 @@ jobs:
push: ${{ inputs.push || true }}
docker_multiplatform: true
deploy_dev:
name: Deploy to the development environment
needs:
name: Deploy to the development environment
needs:
- build
- helm_lint
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v1 # WORKFLOW_VERSION
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@alee/derive-node-version # WORKFLOW_VERSION
secrets: inherit
with:
environment: 'dev'
app_version: '${{ needs.build.outputs.app_version }}'
# deploy_preprod:
# name: Deploy to pre-production environment
# needs:
# needs:
# - build
# - deploy_dev
# uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v1 # WORKFLOW_VERSION
# uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@alee/derive-node-version # WORKFLOW_VERSION
# secrets: inherit
# with:
# environment: 'preprod'
# app_version: '${{ needs.build.outputs.app_version }}'
# deploy_prod:
# name: Deploy to production environment
# needs:
# needs:
# - build
# - deploy_preprod
# uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v1 # WORKFLOW_VERSION
# uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@alee/derive-node-version # WORKFLOW_VERSION
# secrets: inherit
# with:
# environment: 'prod'
# app_version: '${{ needs.build.outputs.app_version }}'
# app_version: '${{ needs.build.outputs.app_version }}'
3 changes: 2 additions & 1 deletion .github/workflows/security_npm_dependency.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,8 @@ on:
jobs:
security-npm-dependency-check:
name: Project security npm dependency check
uses: ministryofjustice/hmpps-github-actions/.github/workflows/security_npm_dependency.yml@v1.0 # WORKFLOW_VERSION
uses: ministryofjustice/hmpps-github-actions/.github/workflows/security_npm_dependency.yml@alee/derive-node-version # WORKFLOW_VERSION
with:
channel_id: C05J915DX0Q
node_version: 22.12
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/security_trivy.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ on:
schedule:
- cron: "19 6 * * MON-FRI" # Every weekday
jobs:
security-kotlin-trivy-check:
security-typescript-trivy-check:
name: Project security trivy dependency check
uses: ministryofjustice/hmpps-github-actions/.github/workflows/security_trivy.yml@v1.0 # WORKFLOW_VERSION
with:

0 comments on commit f5a3e6e

Please sign in to comment.