Skip to content

Add python version inputs #2

Add python version inputs

Add python version inputs #2

Workflow file for this run

name: build-python

Check failure on line 1 in .github/workflows/build-python.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-python.yml

Invalid workflow file

(Line: 27, Col: 19): Unexpected symbol: '"3'. Located at position 24 within expression: vars.PYTHON_VERSION || "3.10"
on:
workflow_call:
inputs:
branch:
type: string
required: false
default: ${{ github.ref || github.head_ref }}
runs_on:
type: string
required: false
default: "ubuntu-22.04"
python_version:
type: string
required: false
secrets:
DATAVISYN_BOT_REPO_TOKEN:
required: false
PYTHON_VERSION:
required: false
env:
PYPI_REGISTRY: "https://upload.pypi.org/legacy/"
PYPI_USERNAME: "test"
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || "3.10" }}
WORKFLOW_BRANCH: "main"
permissions:
contents: read
id-token: write
concurrency:
group: '${{ github.workflow }}-${{ github.ref || github.head_ref }}'
cancel-in-progress: true
jobs:
build-python:
concurrency:
group: "python-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}"
cancel-in-progress: true
permissions:
id-token: write
contents: write
runs-on: ${{ inputs.runs_on || 'ubuntu-22.04' }}
steps:
- name: Checkout source repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
- name: Checkout github-workflows
uses: actions/checkout@v4
with:
repository: datavisyn/github-workflows
ref: ${{ env.WORKFLOW_BRANCH }}
path: ./tmp/github-workflows
- name: Build python
uses: ./tmp/github-workflows/.github/actions/build-node-python
with:
enable_node: false
enable_python: true
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
enable_python_cache: ${{ inputs.runs_on != 'self-hosted' }}