Copy Path to S3

Action ID: roadiehq:aws:s3:cp
NPM Package:

@roadiehq/scaffolder-backend-module-aws

Description

Copies the path to the given bucket

Input Schema

PropertyTypeDescriptionRequired
pathstring-
bucketstring-
prefixstring-
regionstring-
endpointstring-
s3ForcePathStyleboolean-

Output Schema

No output schema defined for this action.

Usage Examples

Upload a React build directory to S3 under a per-service prefix

Copies the build output of a generated app to an S3 bucket. Use this after fetching sources with fetch:template to publish static assets.

Copy
steps:
  - id: fetchBase
    action: fetch:template
    input:
      url: ./template
      values:
        serviceId: ${{ parameters.serviceId }}

  - id: uploadStaticAssets
    action: roadiehq:aws:s3:cp
    input:
      bucket: acme-web-assets
      region: us-east-1
      path: build/
      prefix: apps/${{ parameters.serviceId }}/

Backup the entire generated project to S3 without specifying a path

Uploads all generated files in the workspace to a bucket for archival. Omit path to copy the template output as a whole.

Copy
steps:
  - id: fetchProject
    action: fetch:template
    input:
      url: ./project-template
      values:
        name: ${{ parameters.name }}
        owner: ${{ parameters.owner }}

  - id: backupWorkspaceToS3
    action: roadiehq:aws:s3:cp
    input:
      bucket: acme-scaffold-backups
      region: eu-west-1
      prefix: scaffolds/${{ parameters.owner }}/${{ parameters.name }}/

Upload to an S3-compatible endpoint like LocalStack with path-style addressing

Sends build artifacts to a local S3-compatible service. Set endpoint and s3ForcePathStyle when targeting LocalStack or MinIO.

Copy
steps:
  - id: fetchTemplate
    action: fetch:template
    input:
      url: ./ci-template
      values:
        buildId: ${{ parameters.buildId }}

  - id: uploadToLocalstack
    action: roadiehq:aws:s3:cp
    input:
      bucket: scaffold-artifacts
      region: us-east-1
      path: dist/
      prefix: ci/${{ parameters.buildId }}/
      endpoint: http://localhost:4566
      s3ForcePathStyle: true

Upload a single Kubernetes manifest to a config bucket by environment

Copies a specific manifest file for the selected environment to a platform config bucket.

Copy
steps:
  - id: fetchManifests
    action: fetch:template
    input:
      url: ./k8s-template
      values:
        serviceId: ${{ parameters.serviceId }}
        environment: ${{ parameters.environment }}

  - id: uploadEnvManifest
    action: roadiehq:aws:s3:cp
    input:
      bucket: acme-platform-config
      region: eu-central-1
      path: k8s/manifests/${{ parameters.serviceId }}.yaml
      prefix: manifests/${{ parameters.environment }}/

Publish a repo then upload versioned release artifacts to S3

After publishing the repository with publish:github, upload compiled release artifacts under a versioned prefix.

Copy
steps:
  - id: fetchTemplate
    action: fetch:template
    input:
      url: ./service-template
      values:
        serviceId: ${{ parameters.serviceId }}
        version: ${{ parameters.version }}

  - id: publishRepo
    action: publish:github
    input:
      repoUrl: github.com?owner=acme-inc&repo=${{ parameters.serviceId }}

  - id: uploadReleaseArtifacts
    action: roadiehq:aws:s3:cp
    input:
      bucket: acme-release-artifacts
      region: ap-southeast-2
      path: artifacts/
      prefix: releases/${{ parameters.serviceId }}/${{ parameters.version }}/