Cleanup the onedir before archiving it

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-01-13 14:33:11 +00:00 committed by Pedro Algarvio
parent 8628878b29
commit b0381cc053
4 changed files with 43 additions and 1 deletions

View file

@ -46,3 +46,9 @@ runs:
artifacts/${{ inputs.package-name }}/Scripts/python -m pip install -U "pip>=22.3.1,<23.0"
artifacts/${{ inputs.package-name }}/Scripts/python -m pip install -U "setuptools>=65.6.3,<66"
fi
- name: Cleanup Onedir Directory
shell: bash
if: steps.onedir-pkg-cache.outputs.cache-hit != 'true'
run: |
tools pkg pre-archive-cleanup artifacts/${{ inputs.package-name }}

View file

@ -47,3 +47,8 @@ runs:
else
artifacts/${{ inputs.package-name }}/Scripts/python -m pip install -r requirements/static/pkg/py3.10/${{ inputs.platform }}.txt
fi
- name: Cleanup Salt Onedir Directory
shell: bash
run: |
tools pkg pre-archive-cleanup artifacts/${{ inputs.package-name }}

View file

@ -42,6 +42,11 @@ runs:
artifacts/${{ inputs.package-name }}/Scripts/python -m pip install .
fi
- name: Cleanup Salt Onedir Directory
shell: bash
run: |
tools pkg pre-archive-cleanup artifacts/${{ inputs.package-name }}
- name: Create Tarball
shell: bash
run: |

View file

@ -26,7 +26,7 @@ on:
env:
COLUMNS: 160
CACHE_SEED: SEED-1 # Bump the number to invalidate all caches
CACHE_SEED: SEED-2 # Bump the number to invalidate all caches
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
@ -306,6 +306,10 @@ jobs:
with:
platform: linux
arch: ${{ matrix.arch }}
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Install Salt Packaging Dependencies into Relenv Onedir
uses: ./.github/actions/build-onedir-deps
with:
@ -401,6 +405,10 @@ jobs:
with:
platform: windows
arch: ${{ matrix.arch }}
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Setup Bare Relenv Onedir
uses: ./.github/actions/build-onedir-bare
with:
@ -435,15 +443,21 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup Relenv
uses: ./.github/actions/setup-relenv
with:
platform: windows
arch: ${{ matrix.arch }}
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Install Salt Packaging Dependencies into Relenv Onedir
uses: ./.github/actions/build-onedir-deps
with:
@ -531,15 +545,21 @@ jobs:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Setup Relenv
uses: ./.github/actions/setup-relenv
with:
platform: darwin
arch: ${{ matrix.arch }}
- name: Setup Bare Relenv Onedir
uses: ./.github/actions/build-onedir-bare
with:
@ -574,15 +594,21 @@ jobs:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup Relenv
uses: ./.github/actions/setup-relenv
with:
platform: darwin
arch: ${{ matrix.arch }}
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Install Salt Packaging Dependencies into Relenv Onedir
uses: ./.github/actions/build-onedir-deps
with: