mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix if statements
This commit is contained in:
parent
841ca5da91
commit
262cd51ad3
1 changed files with 14 additions and 14 deletions
28
.github/actions/build-onedir-pkg/action.yml
vendored
28
.github/actions/build-onedir-pkg/action.yml
vendored
|
@ -29,7 +29,7 @@ runs:
|
|||
key: ${{ env.CACHE_SEED }}|relenv|${{ env.RELENV_VERSION }}|deps|${{ inputs.platform }}|${{ inputs.arch }}|${{ inputs.package-name }}|${{ hashFiles(format('{0}/.relenv/**/*.xz', github.workspace), 'requirements/static/pkg/*/*.txt') }}
|
||||
|
||||
- name: Install Salt Into Onedir
|
||||
if: "${{ inputs.platform }}" != "windows"
|
||||
if: ${{ inputs.platform != 'windows' }}
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
|
||||
|
@ -38,15 +38,15 @@ runs:
|
|||
shell: bash
|
||||
run: |
|
||||
artifacts/${{ inputs.package-name }}/bin/python3 -m pip install .
|
||||
if [ "${{ inputs.platform }}" == "darwin" ]; then
|
||||
pkg/macos/prep_salt.sh --build-dir artifacts/${{ inputs.package-name }}
|
||||
rm -rf artifacts/${{ inputs.package-name }}/opt
|
||||
rm -rf artifacts/${{ inputs.package-name }}/etc
|
||||
rm -rf artifacts/${{ inputs.package-name }}/Library
|
||||
if [ ${{ inputs.platform }} == "darwin" ]; then
|
||||
pkg/macos/prep_salt.sh --build-dir ./artifacts/${{ inputs.package-name }}
|
||||
rm -rf ./artifacts/${{ inputs.package-name }}/opt
|
||||
rm -rf ./artifacts/${{ inputs.package-name }}/etc
|
||||
rm -rf ./artifacts/${{ inputs.package-name }}/Library
|
||||
fi
|
||||
|
||||
- name: Install Salt Into Onedir (Windows)
|
||||
if: "${{ inputs.platform }}" == "windows"
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
|
||||
|
@ -54,11 +54,11 @@ runs:
|
|||
shell: powershell
|
||||
run: |
|
||||
# install salt
|
||||
pkg\windows\install_salt.cmd -BuildDir "artifacts\${{ inputs.package-name }}" -CICD
|
||||
pkg\windows\install_salt.cmd -BuildDir ".\artifacts\${{ inputs.package-name }}" -CICD
|
||||
# prep salt
|
||||
pkg\windows\prep_salt.cmd -BuildDir "artifacts\${{ inputs.package-name }}" -CICD
|
||||
pkg\windows\prep_salt.cmd -BuildDir ".\artifacts\${{ inputs.package-name }}" -CICD
|
||||
# Remove package specific items
|
||||
Remove-Item -Path artifacts\${{ inputs.package-name }}\configs -Recurse
|
||||
Remove-Item -Path .\artifacts\${{ inputs.package-name }}\configs -Recurse
|
||||
|
||||
- name: Cleanup Salt Onedir Directory
|
||||
shell: bash
|
||||
|
@ -66,14 +66,14 @@ runs:
|
|||
tools pkg pre-archive-cleanup artifacts/${{ inputs.package-name }}
|
||||
|
||||
- name: Create Archive
|
||||
if: "${{ inputs.platform }}" != "windows"
|
||||
if: ${{ inputs.platform != 'windows' }}
|
||||
shell: bash
|
||||
run: |
|
||||
cd artifacts/
|
||||
tar -cJf ${{ inputs.package-name }}-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz ${{ inputs.package-name }}
|
||||
|
||||
- name: Create Archive (Windows)
|
||||
if: "${{ inputs.platform }}" == "windows"
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
env:
|
||||
ProgressPreference: "SilentlyContinue"
|
||||
ErrorActionPreference: "Stop"
|
||||
|
@ -83,7 +83,7 @@ runs:
|
|||
Compress-Archive -LiteralPath ${{ inputs.package-name }}" -DestinationPath ${{ inputs.package-name }}-${{ inputs.arch }}-${{ inputs.platform }}.zip
|
||||
|
||||
- name: Upload Onedir Tarball as an Artifact
|
||||
if: "${{ inputs.platform }}" != "windows"
|
||||
if: ${{ inputs.platform != 'windows' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
@ -91,7 +91,7 @@ runs:
|
|||
retention-days: 7
|
||||
|
||||
- name: Upload Onedir Zipfile as an Artifact
|
||||
if: "${{ inputs.platform }}" == "windows"
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.arch }}-${{ inputs.platform }}.zip
|
||||
|
|
Loading…
Add table
Reference in a new issue