https://github.com/pei0804/sam-github-actions
https://github.com/pei0804/sam-github-actions
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pei0804/sam-github-actions
- Owner: pei0804
- Created: 2020-01-08T09:36:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-08T09:37:01.000Z (over 6 years ago)
- Last Synced: 2025-12-31T23:57:22.348Z (5 months ago)
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS SAM Action
Performs AWS Serverless Application Model CLI commands in GitHub Actions
---
## Usage
Create `.github/workflow/sam.yaml` file with the required actions similar to the example
given in the workflow section
By default you'll need to set the following secrets in `Settings->Secrets`
```
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION
```
## Example workflow
This workflow packages and deploys the SAM
```
on:
push:
branches:
- master
name: Publish SAM to AWS
jobs:
deploy:
name: Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Package
uses: chriscoffee/sam-github-actions@master
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-west-1
S3_BUCKET: ${{ secrets.S3_BUCKET }}
with:
args: package --template-file template.yaml --s3-bucket ${{ secrets.S3_BUCKET }} --output-template-file packaged.yaml
- name: Deploy
uses: chriscoffee/sam-github-actions@master
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-west-1
STACK_NAME: ${{ secrets.STACK_NAME }}
with:
args: deploy --template-file packaged.yaml --stack-name ${{ secrets.STACK_NAME }} --capabilities CAPABILITY_IAM