mirror of
https://github.com/saltstack/salt.git
synced 2025-04-10 23:01:39 +00:00
90 lines
3.1 KiB
YAML
90 lines
3.1 KiB
YAML
---
|
|
name: build-onedir-salt
|
|
description: Build Onedir Package
|
|
|
|
inputs:
|
|
platform:
|
|
required: true
|
|
description: The platform to build
|
|
arch:
|
|
required: true
|
|
description: The platform arch to build
|
|
package-name:
|
|
required: false
|
|
description: The onedir package name to create
|
|
default: salt
|
|
cache-prefix:
|
|
required: true
|
|
description: Seed used to invalidate caches
|
|
python-version:
|
|
required: true
|
|
description: The python version to build
|
|
salt-version:
|
|
required: true
|
|
description: The Salt version to set prior to building packages.
|
|
|
|
|
|
runs:
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: Install Salt Packaging Dependencies into Relenv Onedir
|
|
uses: ./.github/actions/build-onedir-deps
|
|
with:
|
|
platform: ${{ inputs.platform }}
|
|
arch: ${{ inputs.arch }}
|
|
python-version: "${{ inputs.python-version }}"
|
|
cache-prefix: ${{ inputs.cache-seed }}|relenv|${{ inputs.salt-version }}
|
|
|
|
- name: Download Source Tarball
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: salt-${{ inputs.salt-version }}.tar.gz
|
|
|
|
- name: Install Salt Into Onedir
|
|
shell: bash
|
|
env:
|
|
RELENV_BUILDENV: "1"
|
|
run: |
|
|
tools pkg build salt-onedir salt-${{ inputs.salt-version }}.tar.gz --platform ${{ inputs.platform }} --package-name artifacts/${{ inputs.package-name }}
|
|
|
|
- name: Cleanup Salt Onedir Directory
|
|
shell: bash
|
|
run: |
|
|
tools pkg pre-archive-cleanup artifacts/${{ inputs.package-name }}
|
|
|
|
- name: Create Archive
|
|
shell: bash
|
|
run: |
|
|
cd artifacts/
|
|
tar -cJf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz ${{ inputs.package-name }}
|
|
|
|
- name: Create Archive (Zipfile)
|
|
if: ${{ inputs.platform == 'windows' }}
|
|
shell: powershell
|
|
run: |
|
|
cd artifacts
|
|
py -3 -m zipfile -c "${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.zip" ${{ inputs.package-name }}
|
|
|
|
- name: Create Hash Files
|
|
shell: bash
|
|
run: |
|
|
tools pkg generate-hashes artifacts/${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.*
|
|
|
|
- name: Upload Onedir Tarball as an Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
|
path: artifacts/${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz*
|
|
retention-days: 7
|
|
if-no-files-found: error
|
|
|
|
- name: Upload Onedir Zipfile as an Artifact
|
|
if: ${{ inputs.platform == 'windows' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.zip
|
|
path: artifacts/${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.zip*
|
|
retention-days: 7
|
|
if-no-files-found: error
|