Skip to content

Update aws-sam-cicd.yml #13

Update aws-sam-cicd.yml

Update aws-sam-cicd.yml #13

Workflow file for this run

name: aws-sam-cicd
on:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python 3
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Update pip
run: python -m pip install --upgrade pip
- name: Freeze dependencies
run: pip install -r requirements.txt
- name: Commit and push changes
run: |
git config --global user.name KarmaPol
git config --global user.email kkhkr98@gmail.com
git add requirements.txt
git commit -m 'Chore: Update requirements.txt' || true
git push || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: run pytest
run: pytest
cd:
needs: ci
runs-on: ubuntu-latest
steps:
- name: Create template.yml
run: echo "${{ secrets.AWS_SAM_TEMPLATE_YAML }}" > template.yml
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.9
- uses: aws-actions/setup-sam@v2
- 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: ap-northeast-2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- run: sync --stack-name=ome-restaurant-app