Skip to content

Commit

Permalink
ci: test publish
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroHPAlmeida committed Apr 8, 2024
1 parent 74eb750 commit 3dfcdeb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to lambda
on: [workflow_call]

jobs:
deploy_zip:
name: Deploy Lambda function
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Package dependencies
run: |
mkdir dependencies
pip install -r requirements.txt --target ./dependencies
zip -r dependencies.zip dependencies/
- name: Zip file
run: |
zip -r deploy.zip handler.py dependencies.zip
# - name: default deploy
# uses: appleboy/lambda-action@v0.1.9
# with:
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws_region: ${{ secrets.AWS_REGION }}
# handler: handler
# function_name: handler
# zip_file: deploy.zip
4 changes: 4 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ jobs:
uses: PedroHPAlmeida/actions-workflows-python/.github/workflows/pytest.yaml@1.2
with:
python-version: '3.10'

deploy:
needs: test
uses: ./github/workflows/publish.yaml

0 comments on commit 3dfcdeb

Please sign in to comment.