Skip to content

Commit 3bc8fcc

Browse files
clone repo before configuring cache
1 parent b953a9f commit 3bc8fcc

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,23 @@ jobs:
1313
steps:
1414
- name: Install Docker Buildx
1515
uses: docker/setup-buildx-action@v2
16-
- name: Install poetry
17-
run: pipx install poetry
1816
- name: Set up Python
1917
uses: actions/setup-python@v5
2018
with:
2119
python-version: '3.11'
22-
cache: 'poetry'
20+
21+
- name: Install poetry
22+
run: pipx install poetry
2323

2424
- name: Checkout Repo
2525
uses: actions/checkout@v4
2626

27+
- name: Set up cache for Poetry dependencies
28+
uses: actions/cache@v4
29+
with:
30+
path: ~/.cache/pypoetry
31+
key: poetry-${{ hashFiles('app/poetry.lock') }}
32+
2733
- name: Install Python dependencies with Poetry
2834
working-directory: ./app
2935
run: poetry install --no-interaction --no-root

.github/workflows/deploy.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
environment: production
1515

1616
steps:
17-
- name: Install poetry
18-
run: pipx install poetry
1917
- name: Set up Python
2018
uses: actions/setup-python@v5
2119
with:
2220
python-version: '3.11'
23-
cache: 'poetry'
21+
22+
- name: Install poetry
23+
run: pipx install poetry
2424

2525
- name: Checkout Repo
2626
uses: actions/checkout@v4
@@ -39,6 +39,12 @@ jobs:
3939
role-duration-seconds: 1200
4040
role-to-assume: arn:aws:iam::407839483216:role/admin
4141

42+
- name: Set up cache for Poetry dependencies
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.cache/pypoetry
46+
key: poetry-${{ hashFiles('app/poetry.lock') }}
47+
4248
- name: Install Python dependencies with Poetry
4349
working-directory: ./app
4450
run: poetry install --no-interaction --no-root

0 commit comments

Comments
 (0)