mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00

It's now also used to detect changes to workflows. Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
---
|
|
name: build-onedir-deps
|
|
description: Build Onedir Dependencies
|
|
inputs:
|
|
platform:
|
|
required: true
|
|
type: string
|
|
description: The platform to build
|
|
arch:
|
|
required: true
|
|
type: string
|
|
description: The platform arch to build
|
|
python-version:
|
|
required: true
|
|
type: string
|
|
description: The python version to build
|
|
package-name:
|
|
required: false
|
|
type: string
|
|
description: The onedir package name to create
|
|
default: salt
|
|
cache-prefix:
|
|
required: true
|
|
type: string
|
|
description: Seed used to invalidate caches
|
|
|
|
|
|
env:
|
|
COLUMNS: 190
|
|
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
|
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
|
|
RELENV_BUILDENV: 1
|
|
|
|
|
|
runs:
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: Cache Deps Onedir Package Directory
|
|
id: onedir-pkg-cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: artifacts/${{ inputs.package-name }}
|
|
key: >
|
|
${{ inputs.cache-prefix }}|${{ inputs.python-version }}|deps|${{ inputs.platform }}|${{ inputs.arch }}|${{ inputs.package-name }}|
|
|
${{ hashFiles(
|
|
format('{0}/.relenv/**/*.xz', github.workspace),
|
|
'requirements/static/pkg/*/*.txt',
|
|
'.github/actions/build-onedir-deps/action.yml',
|
|
'cicd/shared-gh-workflows-context.yml'
|
|
) }}
|
|
|
|
- name: Install Salt Onedir Package Dependencies
|
|
shell: bash
|
|
if: steps.onedir-pkg-cache.outputs.cache-hit != 'true'
|
|
run: |
|
|
tools pkg build onedir-dependencies --arch ${{ inputs.arch }} --python-version ${{ inputs.python-version }} --package-name artifacts/${{ inputs.package-name }} --platform ${{ inputs.platform }}
|
|
|
|
- name: Cleanup Salt Onedir Directory
|
|
shell: bash
|
|
run: |
|
|
tools pkg pre-archive-cleanup artifacts/${{ inputs.package-name }}
|