aws-actions / setup-sam

Action to set up AWS SAM CLI and add it to the PATH
Apache License 2.0
151 stars 23 forks source link

Example without Docker #28

Closed hoffa closed 3 years ago

hoffa commented 3 years ago

Current documentation only includes the catch-all approach using --use-container. This works great on GitHub-hosted runners, but might be less straightforward on self-hosted ones lacking Docker (there is no official setup-docker either). It also potentially takes longer than using setup-node and sam building the app right away, as many setup-* actions are cached.

Example:

on:
  push:
    branches:
      - main
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
      - uses: actions/setup-node@v2
        with:
          node-version: '14'
      - uses: aws-actions/setup-sam@v0
      - uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: us-east-2
      - run: sam build
      - run: sam deploy --no-confirm-changeset --no-fail-on-empty-changeset

Maybe have a section for building with Docker, and one without?

hoffa commented 3 years ago

Closing for now; arguably confusing and can document elsewhere.