chore: Update actions used to build release containers #316
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: File-server - build and deploy | |
on: | |
workflow_dispatch: | |
inputs: | |
fileserver_release_name: | |
description: 'file-server package version' | |
required: false | |
default: 'nightly' | |
fileserver_ref: | |
description: 'file-server package ref' | |
required: false | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build single-architecture container images | |
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected] | |
with: | |
image_name: 'file-server' | |
package_dependencies: | | |
@flowfuse/file-server | |
build_context: 'file-server' | |
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-multi-architecture: | |
name: Build multi-architecture container image | |
needs: build | |
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected] | |
with: | |
image_name: 'file-server' | |
secrets: | |
temporary_registry_token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-stage: | |
if: github.ref_name == 'main' | |
name: Deploy to staging environment | |
needs: build-multi-architecture | |
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected] | |
with: | |
environment: stage | |
service_name: 'file-server' | |
deployment_name: 'flowforge-file' | |
container_name: 'file-storage' | |
image: ${{ needs.build-multi-architecture.outputs.image }} | |
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 }} | |
deploy-prod: | |
if: github.ref_name == 'main' | |
name: Deploy to production environment | |
needs: [build-multi-architecture, deploy-stage] | |
uses: flowfuse/github-actions-workflows/.github/workflows/[email protected] | |
with: | |
environment: production | |
service_name: 'file-server' | |
deployment_name: 'flowforge-file' | |
container_name: 'file-storage' | |
image: ${{ needs.build-multi-architecture.outputs.image }} | |
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 }} |