Skip to content

Build Node-RED container #473

Build Node-RED container

Build Node-RED container #473

name: Build Node-RED container
on:
workflow_dispatch:
inputs:
nr_project_nodes_release_name:
description: 'nr-project-nodes package version'
required: false
default: 'nightly'
nr_project_nodes_ref:
description: 'nr-project-nodes package ref'
required: false
push:
branches:
- main
paths-ignore:
- 'helm/**'
- '.github/workflows/helm*'
pull_request:
branches:
- main
paths-ignore:
- 'helm/**'
- '.github/workflows/helm*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build-302:
name: Build 3.0.2 container images
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
image_name: 'node-red'
dockerfile_path: Dockerfile
image_tag_prefix: '3.0.2-'
package_dependencies: |
@flowforge/nr-project-nodes
build_context: 'node-red-container'
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
scan_image: true
secrets:
npm_registry_auth_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
build-302-multi-architecture:
name: Build multi-architecture container image
needs: build-302
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
image_name: 'node-red'
image_tag_prefix: '3.0.2-'
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
upload-302-stage:
name: Upload image to staging ECR
if: github.ref_name == 'main'
needs: build-302-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
environment: stage
service_name: 'node-red'
deployment_name: 'node-red'
container_name: 'node-red'
deploy: false
image: ${{ needs.build-302-multi-architecture.outputs.image }}
image_tag_prefix: '3.0.2-'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}
upload-302-prod:
name: Upload image to production ECR
if: github.ref_name == 'main'
needs: build-302-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
environment: production
service_name: 'node-red'
deployment_name: 'node-red'
container_name: 'node-red'
deploy: false
image: ${{ needs.build-302-multi-architecture.outputs.image }}
image_tag_prefix: '3.0.2-'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}
build-223:
name: Build 2.2.3 container images
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
image_name: 'node-red'
dockerfile_path: Dockerfile-2.2.x
image_tag_prefix: '2.2.3-'
package_dependencies: |
@flowforge/nr-project-nodes
build_context: 'node-red-container'
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
scan_image: true
secrets:
npm_registry_auth_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
build-223-multi-architecture:
name: Build multi-architecture container image
needs: build-223
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
image_name: 'node-red'
image_tag_prefix: '2.2.3-'
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
upload-223-stage:
name: Upload image to staging ECR
if: github.ref_name == 'main'
needs: build-223-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
environment: stage
service_name: 'node-red'
deployment_name: 'node-red'
container_name: 'node-red'
deploy: false
image: ${{ needs.build-223-multi-architecture.outputs.image }}
image_tag_prefix: '2.2.3-'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}
upload-223-prod:
name: Upload image to production ECR
if: github.ref_name == 'main'
needs: build-223-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
environment: production
service_name: 'node-red'
deployment_name: 'node-red'
container_name: 'node-red'
deploy: false
image: ${{ needs.build-223-multi-architecture.outputs.image }}
image_tag_prefix: '2.2.3-'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}
build-310:
name: Build 3.1.x container images
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
image_name: 'node-red'
dockerfile_path: Dockerfile-3.1
image_tag_prefix: '3.1.x-'
package_dependencies: |
@flowforge/nr-project-nodes
build_context: 'node-red-container'
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
scan_image: true
secrets:
npm_registry_auth_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
build-310-multi-architecture:
name: Build multi-architecture container image
needs: build-310
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
image_name: 'node-red'
image_tag_prefix: '3.1.x-'
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
upload-310-stage:
name: Upload image to staging ECR
if: github.ref_name == 'main'
needs: build-310-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
environment: stage
service_name: 'node-red'
deployment_name: 'node-red'
container_name: 'node-red'
deploy: false
image: ${{ needs.build-310-multi-architecture.outputs.image }}
image_tag_prefix: '3.1.x-'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}
upload-310-prod:
name: Upload image to production ECR
if: github.ref_name == 'main'
needs: build-310-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
environment: production
service_name: 'node-red'
deployment_name: 'node-red'
container_name: 'node-red'
deploy: false
image: ${{ needs.build-310-multi-architecture.outputs.image }}
image_tag_prefix: '3.1.x-'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}
build-40:
name: Build 4.0.x container images
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
image_name: 'node-red'
dockerfile_path: Dockerfile-4.0
image_tag_prefix: '4.0.x-'
package_dependencies: |
@flowforge/nr-project-nodes
build_context: 'node-red-container'
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
scan_image: true
secrets:
npm_registry_auth_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
build-40-multi-architecture:
name: Build multi-architecture container image
needs: build-40
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
image_name: 'node-red'
image_tag_prefix: '4.0.x-'
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
upload-40-stage:
name: Upload image to staging ECR
if: github.ref_name == 'main'
needs: build-40-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
environment: stage
service_name: 'node-red'
deployment_name: 'node-red'
container_name: 'node-red'
deploy: false
image: ${{ needs.build-40-multi-architecture.outputs.image }}
image_tag_prefix: '4.0.x-'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}
upload-40-prod:
name: Upload image to production ECR
if: github.ref_name == 'main'
needs: build-40-multi-architecture
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected]
with:
environment: production
service_name: 'node-red'
deployment_name: 'node-red'
container_name: 'node-red'
deploy: false
image: ${{ needs.build-40-multi-architecture.outputs.image }}
image_tag_prefix: '4.0.x-'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
eks_cluster_name: ${{ secrets.EKS_CLUSTER_NAME }}