Skip to content

Commit

Permalink
Set node version in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrlee committed Dec 5, 2024
1 parent 475861b commit 5236d95
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Pipeline [test -> build -> deploy]
on:
push:
branches:
- '**'
- '**'
workflow_dispatch:
inputs:
additional_docker_tag:
Expand All @@ -17,32 +17,41 @@ on:
default: false
type: boolean

env:
NODE_VERSION: 22.12

permissions:
contents: read
packages: write

jobs:
# main node build workflow
node_build:
name: node build
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_build.yml@v1 # WORKFLOW_VERSION
with:
node_version: $NODE_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
needs: [node_build]
secrets: inherit
with:
node_version: $NODE_VERSION
# 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
needs: [node_build]
secrets: inherit
with:
node_version: $NODE_VERSION
helm_lint:
strategy:
matrix:
environments: ['dev','preprod','prod']
environments: ['dev', 'preprod', 'prod']
name: helm lint
uses: ministryofjustice/hmpps-github-actions/.github/workflows/test_helm_lint.yml@v1 # WORKFLOW_VERSION
secrets: inherit
Expand All @@ -52,7 +61,7 @@ jobs:
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:
needs:
- node_integration_tests
- node_unit_tests
with:
Expand All @@ -62,8 +71,8 @@ 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
Expand All @@ -73,7 +82,7 @@ jobs:
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
Expand All @@ -83,11 +92,11 @@ jobs:
# 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
# secrets: inherit
# with:
# environment: 'prod'
# app_version: '${{ needs.build.outputs.app_version }}'
# app_version: '${{ needs.build.outputs.app_version }}'
4 changes: 4 additions & 0 deletions .github/workflows/security_npm_dependency.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
env:
NODE_VERSION: 22.12

name: Security npm dependency check
on:
workflow_dispatch:
Expand All @@ -9,4 +12,5 @@ jobs:
uses: ministryofjustice/hmpps-github-actions/.github/workflows/[email protected] # WORKFLOW_VERSION
with:
channel_id: C05J915DX0Q
node_version: $NODE_VERSION
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/security_trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected] # WORKFLOW_VERSION
with:
Expand Down

0 comments on commit 5236d95

Please sign in to comment.