I use actions/setup-python@v4
frequently in the following:
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
container:
image: catthehacker/ubuntu:act-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Update Ubuntu
env:
DEBIAN_FTONTEND: noninteractive
run: sudo apt-get update
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: sudo apt-get install -y -qq libtinfo5 ccache bc
I have two questions:
-
I searched for a way to cache it but I only found a way to cache pip dependencies, not python itself. Is there a way to cache it?
-
The image I’m using
catthehacker/ubuntu:act-22.04
actually does include python 3.10.12. However even if I specify this version in the script, it saysVersion 3.10.12 was not found in the local cache
and it goes ahead and download then install it. Why is it doing that and how can I avoid it?