From 43d2e66b6a017001775d3e0f03cd3dac42d5b277 Mon Sep 17 00:00:00 2001 From: Benjamin Hays Date: Sat, 12 Oct 2024 19:28:23 -0400 Subject: [PATCH] add caching and version control for pip packages --- .gitea/workflows/ansible-deploy.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ansible-deploy.yml b/.gitea/workflows/ansible-deploy.yml index e0018fb..ee22a0b 100644 --- a/.gitea/workflows/ansible-deploy.yml +++ b/.gitea/workflows/ansible-deploy.yml @@ -5,6 +5,7 @@ jobs: runs-on: ubuntu-latest env: RUNNER_TOOL_CACHE: /toolcache + ANSIBLE_VERSION: 10.5.0 strategy: matrix: playbook: @@ -25,11 +26,17 @@ jobs: with: submodules: recursive + - name: "Cache python packages" + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-${{ env.ANSIBLE_VERSION }} + - name: Install Ansible run: | apt update -y apt install python3-pip -y - python3 -m pip install ansible + python3 -m pip install ansible==${{ env.ANSIBLE_VERSION }} #- name: Install Ansible Galaxy requirements # run: |