Created
February 3, 2023 15:17
-
-
Save atemate/adb4d2445a809d1185d899346a3e7e72 to your computer and use it in GitHub Desktop.
gh-workflow-caching-poetry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# not sure if it's best way. Maybe better just: | |
# - name: Install Python 3.8 | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: 3.8 | |
# cache: poetry | |
- name: Configure docker | |
uses: docker/login-action@v2 | |
with: | |
registry: us-central1-docker.pkg.dev | |
username: oauth2accesstoken | |
password: ${{ steps.auth.outputs.access_token }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.2.2 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
... | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment