salt/.github/actions/setup-relenv/action.yml
Pedro Algarvio 6531a388ab Bump to relenv 0.12.3
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-05-05 10:11:18 +01:00

66 lines
1.6 KiB
YAML

---
name: setup-relenv
description: Setup Relenv
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 version of python to build
cache-seed:
required: true
type: string
description: Seed used to invalidate caches
version:
required: false
type: string
description: The version of relenv to use
default: 0.12.3
outputs:
version:
value: ${{ inputs.version }}
env:
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
runs:
using: composite
steps:
- name: Install Relenv
shell: bash
run: |
python3 -m pip install relenv==${{ inputs.version }}
- name: Cache Relenv Data Directory
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.relenv
key: ${{ inputs.cache-seed }}|relenv|${{ inputs.version }}|${{ inputs.python-version }}|${{ inputs.platform }}|${{ inputs.arch }}
- name: Fetch Toolchain
if: ${{ inputs.platform == 'linux' }}
shell: bash
env:
RELENV_FETCH_VERSION: "${{ inputs.version }}"
run: |
python3 -m relenv toolchain fetch --arch=${{ inputs.arch }}
- name: Fetch Native Python Build
shell: bash
env:
RELENV_FETCH_VERSION: "${{ inputs.version }}"
run: |
python3 -m relenv fetch --arch=${{ inputs.arch }} --python=${{ inputs.python-version }}