Skip to content

Commit

Permalink
Faster build time|
Browse files Browse the repository at this point in the history
- by exporting requirements.txt
  • Loading branch information
sansmoraxz committed May 17, 2023
1 parent a9dac1c commit a639712
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/layerpipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ jobs:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Configure poetry
run: |
poetry config --local virtualenvs.in-project true
poetry config --local virtualenvs.path .venv
poetry config --local virtualenvs.options.always-copy true

- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
cache: 'pip'

- name: AWS login
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -46,7 +42,7 @@ jobs:

- name: Zip dependencies
run: |
cp -r .venv/lib/python3.10/site-packages python
poetry run pip install -r <(poetry export -f requirements.txt --without-hashes) -t python
zip -r lambda.zip python
- name: Upload zip to S3
run: aws s3 cp lambda.zip s3://${{ secrets.AWS_BUCKET }}/${{ github.event.repository.name }}-${{ github.sha }}.zip
Expand Down

0 comments on commit a639712

Please sign in to comment.