Skip to content

Added compound-python-dev #1

Added compound-python-dev

Added compound-python-dev #1

name: Compound Dev Python check, build and pypi publish
on:
workflow_call:
inputs:
runsOn:
required: false
type: string
default: 'ubuntu-latest'
pythonVersion:
required: false
type: string
default: '3.8'
scanner-enabled:
required: false
type: boolean
default: true
description: 'Whether vulnerabilities and license scanning are enabled'
strict-scanner:
required: false
type: boolean
default: true
description: 'Whether vulnerabilities and license scanning executions are strict'
pypi-url:
required: false
type: string
default: 'https://upload.pypi.org/legacy/'
description: 'TODO'
# outputs:
# version:
# description: "Generated version of the image"
# value: ${{ jobs.prebuild-job.outputs.version }}
secrets:
pypi-user:
required: true
description: 'TODO'
pypi-password:
required: true
description: 'TODO'
jobs:
prebuild-job:
name: Prebuild Job
runs-on: ${{ inputs.runsOn }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: th2-net/.github/.github/workflows/python-get-version.yml@python-check # FIXME: change to main
id: get-version
with: # TODO
runsOn: ${{ inputs.runsOn }}
- name: Build custom package version
id: release-ver
run: echo ::set-output name=custom-version::"${{ steps.get-version.outputs.version }}.dev${{ github.run_id }}"
- name: Show package version
run: echo ${{ steps.release-ver.outputs.custom-version }}
outputs:
version: ${{ steps.get-version.outputs.version }}
custom-version: ${{ steps.release-ver.outputs.custom-version }}
matrix-test:
name: Matrix test Job
uses: th2-net/.github/.github/workflows/compound-python-matrix-test.yml@python-check # FIXME: change to main
with: # TODO:
runsOn: ${{ inputs.runsOn }}
vulnarbility-scan:
if: inputs.scanner-enabled
uses: th2-net/.github/.github/workflows/python-scan.yml@python-check # FIXME: change to main
# with: TODO
# secrets: TODO
license-check:
if: inputs.scanner-enabled
uses: th2-net/.github/.github/workflows/license_check.yml@python-check # FIXME: change to main
needs: [prebuild-job]
with:
version: ${{ needs.prebuild-job.outputs.custom-version }}
set-version:
name: Set custom version
if: inputs.strict-scanner && success() || !inputs.strict-scanner
needs: [prebuild-job]
uses: th2-net/.github/.github/workflows/python-set-version.yml@python-check # FIXME: change to main
with:
version: ${{ needs.prebuild-job.outputs.custom-version }}
pypi-publish:
name: Publish to PyPi
needs: [set-version]
uses: th2-net/.github/.github/workflows/python-pypi-publish.yml@python-check # FIXME: change to main