Skip to content

Shared Actions for Dust Foundation projects

Notifications You must be signed in to change notification settings

DustFoundation/shared-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

shared-actions


Terraform Apply

OPTION TYPE
working-directory ?string (default: tf)
apply-command ?string (default: terraform init | terraform apply)
jobs:
  apply:
    uses: DustFoundation/shared-actions/.github/workflows/[email protected]
    secrets:
      aws-id: ${{ secrets.AWS_ID_DEV }}
      aws-secret: ${{ secrets.AWS_SECRET_DEV }}
      git-read-key: ${{ secrets.GIT_READ_KEY }}
  • If you have environments in folders:
    with:
      working-directory: tf/_env/dev
  • If you have a script for configure backend:
    with:
      apply-command: ./apply-stage.sh
  • If you want to define terraform command for each stage
    with:
      apply-command: |
        terraform init -backend-config="key=stage/frontend.tfstate"
        terraform apply -auto-approve -var-file stage.tfvars

Terraform Plan

OPTION TYPE
working-directory ?string (default: tf)
jobs:
  plan:
    uses: DustFoundation/shared-actions/.github/workflows/[email protected]
    secrets:
      aws-id: ${{ secrets.AWS_ID_DEV }}
      aws-secret: ${{ secrets.AWS_SECRET_DEV }}
      git-read-key: ${{ secrets.GIT_READ_KEY }}
  • If you have environments in folders:
    with:
      working-directory: tf/_env/dev

Serverless Deploy (Node.js)

OPTION TYPE
stage enum: dev | stage | prod
node-version ?number (default: 16)
jobs:
  deploy:
    uses: DustFoundation/shared-actions/.github/workflows/[email protected]
    with:
      stage: dev
    secrets:
      aws-id: ${{ secrets.AWS_ID_DEV }}
      aws-secret: ${{ secrets.AWS_SECRET_DEV }}
      git-read-key: ${{ secrets.GIT_READ_KEY }}

CI (Node.js)

OPTION TYPE
node-version ?number (default: 16)
jobs:
  ci:
    uses: DustFoundation/shared-actions/.github/workflows/[email protected]
    secrets:
      aws-id: ${{ secrets.AWS_ID_DEV }}
      aws-secret: ${{ secrets.AWS_SECRET_DEV }}
      git-read-key: ${{ secrets.GIT_READ_KEY }}

Publish (NPM)

OPTION TYPE
node-version ?number (default: 16)
jobs:
  publish:
    uses: DustFoundation/shared-actions/.github/workflows/[email protected]
    secrets:
      npm-publish-token: ${{ secrets.NPM_PUBLISH_TOKEN }}

Create Release

OPTION TYPE
prerelease ?boolean (default: true)
jobs:
  release:
    uses: DustFoundation/shared-actions/.github/workflows/[email protected]