Skip to content

Instantly share code, notes, and snippets.

@atemate
Created February 3, 2023 15:17
Show Gist options
  • Save atemate/adb4d2445a809d1185d899346a3e7e72 to your computer and use it in GitHub Desktop.
Save atemate/adb4d2445a809d1185d899346a3e7e72 to your computer and use it in GitHub Desktop.
gh-workflow-caching-poetry
# 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