Skip to content

Commit

Permalink
Drop the cache-suffix from the setup-python-tools-scripts action
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Algarvio <[email protected]>
  • Loading branch information
s0undt3ch committed Nov 23, 2023
1 parent 3ce935e commit 234693b
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 40 deletions.
8 changes: 2 additions & 6 deletions .github/actions/setup-python-tools-scripts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ inputs:
required: true
type: string
description: Seed used to invalidate caches
cache-suffix:
required: false
type: string
description: Seed used to invalidate caches
cwd:
type: string
description: The directory the salt checkout is located in
Expand Down Expand Up @@ -42,8 +38,8 @@ runs:
shell: bash
run: |
VENV_NAME_HASH=$(echo "${{ inputs.cache-prefix }}|${{ github.workflow }}|${{
steps.get-python-version.outputs.version-sha256sum }}|${{ hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}${{
inputs.cache-suffix || '' }}" | sha256sum | cut -d ' ' -f 1)
steps.get-python-version.outputs.version-sha256sum }}|${{
hashFiles('requirements/**/*.txt', 'tools/**/*.py') }}" | sha256sum | cut -d ' ' -f 1)
echo "TOOLS_VIRTUALENV_CACHE_SEED=$VENV_NAME_HASH" | tee -a "${GITHUB_ENV}"
echo "venv-hash=$VENV_NAME_HASH" | tee -a "${GITHUB_OUTPUT}"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-deps-onedir-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ inputs.cache-seed }}
cache-suffix: build-deps-linux-${{ matrix.arch }}
cache-prefix: ${{ inputs.cache-seed }}-build-deps-linux-${{ matrix.arch }}

- name: Setup Relenv
id: setup-relenv
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-deps-onedir-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ inputs.cache-seed }}
cache-suffix: build-deps-macos
cache-prefix: ${{ inputs.cache-seed }}-build-deps-macos

- name: Setup Relenv
id: setup-relenv
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-deps-onedir-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ inputs.cache-seed }}
cache-suffix: build-deps-windows-${{ matrix.arch }}
cache-prefix: ${{ inputs.cache-seed }}-build-deps-windows-${{ matrix.arch }}

- name: Setup Relenv
id: setup-relenv
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: changelog
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-changelog

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -400,8 +399,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: build
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -2741,8 +2739,7 @@ jobs:
id: python-tools-scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: coverage
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-coverage

- name: Install Nox
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: changelog
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-changelog

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -449,8 +448,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: build
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -2802,8 +2800,7 @@ jobs:
id: python-tools-scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: coverage
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-coverage

- name: Install Nox
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: changelog
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-changelog

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -434,8 +433,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: build
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -2775,8 +2773,7 @@ jobs:
id: python-tools-scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: coverage
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-coverage

- name: Install Nox
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: changelog
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-changelog

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -439,8 +438,7 @@ jobs:
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: build
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build

- name: Setup Salt Version
id: setup-salt-version
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/templates/ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: changelog
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-changelog

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -218,8 +217,7 @@
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: build
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-build

- name: Setup Salt Version
id: setup-salt-version
Expand Down Expand Up @@ -330,8 +328,7 @@
id: python-tools-scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}
cache-suffix: coverage
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}-coverage

- name: Install Nox
run: |
Expand Down

0 comments on commit 234693b

Please sign in to comment.