Skip to content

Commit

Permalink
👷 Caching poetry for faster CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aliberts committed Nov 26, 2023
1 parent b489c20 commit 5f2c791
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Connect to AWS role, build and push to ECR
name: Deploy code to AWS lambda

on:
push:
Expand All @@ -17,15 +17,15 @@ jobs:
steps:
- name: Git clone the repository
uses: actions/checkout@v4
- name: Load cached $HOME/.local
uses: actions/cache@v3
with:
path: ~/.local
key: dotlocal-${{ runner.os }}-${{ hashFiles('.github/workflows/deploy.yml') }}
- name: Install poetry & poetry export
run: |
pipx install poetry
pipx inject poetry poetry-plugin-export
- name: Cache poetry
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- name: Export requirements.txt
run: poetry export -f requirements.txt --output requirements.txt --without-hashes
- name: Configure aws credentials
Expand All @@ -37,13 +37,13 @@ jobs:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build, tag, and push image to Amazon ECR
- name: Build, tag and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
docker build --platform linux/amd64 -t $ECR_REGISTRY/inews:latest .
docker push $ECR_REGISTRY/inews:latest
- name: Updating lambda
- name: Update lambda code
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
Expand Down

0 comments on commit 5f2c791

Please sign in to comment.