Skip to content

Add examples for using Serverless Plugins #28

@matthewpoer

Description

@matthewpoer

Sharing an example of using this Action with one or more SLS Serverless plugins. Would be nice to add some notes around this to the README.md. The key is to set both args and entrypoint on the step.

Similar tactic is used in #26 to capture resources.Outputs data.

name: Deploy
on:
  push:
    branches:
      - master
jobs:
  deploy:
    name: Deployment
    runs-on: ubuntu-latest
    strategy:
      matrix:
        stages:
          - stage: 'dev'
            AWS_SECRET_ACCESS_KEY: 'AWS_SECRET_ACCESS_KEY_DEV'
            AWS_ACCESS_KEY_ID: 'AWS_ACCESS_KEY_ID_DEV'
          - stage: 'prod'
            AWS_SECRET_ACCESS_KEY: 'AWS_SECRET_ACCESS_KEY_PROD'
            AWS_ACCESS_KEY_ID: 'AWS_ACCESS_KEY_ID_PROD'
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Install VPC Plugin and Deploy
      uses: serverless/github-action@v1.53.0
      with:
        args: -c "serverless plugin install --name serverless-vpc-discovery && serverless deploy --stage=${{ matrix.stages.stage }} --verbose"
        entrypoint: /bin/bash
      env:
        AWS_ACCESS_KEY_ID: ${{ secrets[matrix.stages.AWS_ACCESS_KEY_ID] }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets[matrix.stages.AWS_SECRET_ACCESS_KEY] }}
        SLS_DEBUG: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy