Skip to content

Build Node-RED container #660

Build Node-RED container

Build Node-RED container #660

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:
- 'node-red-container/**'
- '.github/workflows/nodered-container.yml'
pull_request:
branches:
- main
paths:
- 'node-red-container/**'
- '.github/workflows/nodered-container.yml'
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=nightly
build_context: 'node-red-container'
build_platform: "linux/arm64"
build_arguments: |
BUILD_TAG=nightly
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
scan_image: false
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
upload-302-stage:
name: Upload image to staging ECR
if: github.ref_name == 'main'
needs: build-302
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.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
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.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=nightly
build_context: 'node-red-container'
build_platform: "linux/arm64"
build_arguments: |
BUILD_TAG=nightly
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
scan_image: false
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
upload-223-stage:
name: Upload image to staging ECR
if: github.ref_name == 'main'
needs: build-223
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.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
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.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=nightly
build_context: 'node-red-container'
build_platform: "linux/arm64"
build_arguments: |
BUILD_TAG=nightly
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
scan_image: false
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
upload-310-stage:
name: Upload image to staging ECR
if: github.ref_name == 'main'
needs: build-310
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.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
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.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=nightly
build_context: 'node-red-container'
build_platform: "linux/arm64"
build_arguments: |
BUILD_TAG=nightly
npm_registry_url: ${{ vars.PUBLIC_NPM_REGISTRY_URL }}
scan_image: false
secrets:
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }}
upload-40-stage:
name: Upload image to staging ECR
if: github.ref_name == 'main'
needs: build-40
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.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
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.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 }}