Skip to content

Update output.yaml

Update output.yaml #26

Workflow file for this run

name: Deploy my Lambda Function
# Trigger on all push events to the main branch
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install libraries
run: |
cd function
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt -t .; fi
- name: Create zip bundle
run: |
cd function
zip -r ../${{ github.sha }}.zip .
- name: Archive artifact
uses: actions/upload-artifact@v4
with:
name: zipped-bundle
path: ${{ github.sha }}.zip
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: zipped-bundle
- name: Configure AWS CLI
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_SECRET_KEY }}
aws-region: us-east-1
- name: Upload artifacts to S3
run: aws s3 cp ${{ github.sha }}.zip s3://jayasriawsbucket/${{ github.sha }}