diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 6a023600..16a3f62d 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -3,7 +3,7 @@ name: Pipeline [test -> build -> deploy] on: push: branches: - - '**' + - '**' workflow_dispatch: inputs: additional_docker_tag: @@ -17,15 +17,25 @@ on: default: false type: boolean + + permissions: contents: read packages: write - + jobs: + env_vars: + outputs: + NODE_VERSION: 22.12 + steps: + - run: echo "shared variable set" + # 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: ${{ env_vars.outputs.NODE_VERSION }} secrets: inherit # generic node unit tests - feel free to override with local tests if required node_unit_tests: @@ -33,16 +43,20 @@ jobs: uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_unit_tests.yml@v1 # WORKFLOW_VERSION needs: [node_build] secrets: inherit + with: + node_version: ${{ env_vars.outputs.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: ${{ env_vars.outputs.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 @@ -52,7 +66,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: @@ -62,8 +76,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 @@ -73,7 +87,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 @@ -83,11 +97,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 }}' \ No newline at end of file + # app_version: '${{ needs.build.outputs.app_version }}' diff --git a/.github/workflows/security_npm_dependency.yml b/.github/workflows/security_npm_dependency.yml index 2df8859c..556f3074 100644 --- a/.github/workflows/security_npm_dependency.yml +++ b/.github/workflows/security_npm_dependency.yml @@ -1,3 +1,6 @@ +env: + NODE_VERSION: 22.12 + name: Security npm dependency check on: workflow_dispatch: @@ -9,4 +12,5 @@ jobs: uses: ministryofjustice/hmpps-github-actions/.github/workflows/security_npm_dependency.yml@v1.0 # WORKFLOW_VERSION with: channel_id: C05J915DX0Q + node_version: ${{ env.NODE_VERSION }} secrets: inherit diff --git a/.github/workflows/security_trivy.yml b/.github/workflows/security_trivy.yml index 164cb24f..d29134c8 100644 --- a/.github/workflows/security_trivy.yml +++ b/.github/workflows/security_trivy.yml @@ -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: