From db5c667138afa4d0226b77655a4abe179bce866a Mon Sep 17 00:00:00 2001 From: Ying Shaodong Date: Sat, 3 Aug 2024 11:35:15 +0800 Subject: [PATCH] fix: duplications in ci actions --- .github/actions/setup-pandoc/action.yml | 10 +++++++++- .github/actions/setup-poetry/action.yml | 15 +-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/actions/setup-pandoc/action.yml b/.github/actions/setup-pandoc/action.yml index 3fa3346..babc42d 100644 --- a/.github/actions/setup-pandoc/action.yml +++ b/.github/actions/setup-pandoc/action.yml @@ -10,8 +10,16 @@ inputs: runs: using: "composite" steps: + - name: Load cached Pandoc + id: cached-pandoc + uses: actions/cache@v4 + with: + path: /usr/local/bin/pandoc + key: pandoc-${{ runner.os }}-${{ hashFiles('.tool-versions') }} + - name: Install Pandoc + if: steps.cached-pandoc.outputs.cache-hit != 'true' run: | sudo apt-get update - sudo apt-get install -y pandoc + sudo apt-get install -y pandoc=${{ inputs.python-version }} shell: bash diff --git a/.github/actions/setup-poetry/action.yml b/.github/actions/setup-poetry/action.yml index 81a76da..ed794dd 100644 --- a/.github/actions/setup-poetry/action.yml +++ b/.github/actions/setup-poetry/action.yml @@ -19,6 +19,7 @@ runs: uses: snok/install-poetry@v1 with: virtualenvs-in-project: true + plugins: oetry-plugin-export - name: Load cached venv id: cached-poetry-dependencies @@ -31,17 +32,3 @@ runs: if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: poetry install --no-interaction shell: bash - - - name: Load cached Pandoc - id: cached-pandoc - uses: actions/cache@v4 - with: - path: /usr/local/bin/pandoc - key: pandoc-${{ runner.os }}-${{ hashFiles('.tool-versions') }} - - - name: Install Pandoc - if: steps.cached-pandoc.outputs.cache-hit != 'true' - run: | - sudo apt-get update - sudo apt-get install -y pandoc - shell: bash