/shared-actions

Shared Actions for Dust Foundation projects

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/terraform-apply.yml@v1.1.5
    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/terraform-plan.yml@v1.1.5
    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/serverless-deploy-nodejs.yml@v1.1.5
    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/ci-nodejs.yml@v1.1.5
    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/publish-npm.yml@v1.1.5
    secrets:
      npm-publish-token: ${{ secrets.NPM_PUBLISH_TOKEN }}

Create Release

OPTION TYPE
prerelease ?boolean (default: true)
jobs:
  release:
    uses: DustFoundation/shared-actions/.github/workflows/create-release.yml@v1.1.5