32 lines
897 B
YAML
32 lines
897 B
YAML
name: "check-latest-version-exists action"
|
|
description: "Check whether the latest github release/tag of a pypi package exists on a registry. If not, return the latest version"
|
|
|
|
inputs:
|
|
github-repository:
|
|
description: "The package's Github repository name (owner/repo)"
|
|
required: true
|
|
pypi-package:
|
|
description: "The name of the package"
|
|
required: true
|
|
pypi-base-url:
|
|
description: "The pypi registry URL"
|
|
required: true
|
|
|
|
outputs:
|
|
version:
|
|
description: "The version of the package"
|
|
value: ${{ steps.check.outputs.version }}
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- id: check
|
|
shell: bash
|
|
run: |
|
|
pip3 install requests
|
|
exec python3 $GITHUB_ACTION_PATH/check.py >> $GITHUB_OUTPUT
|
|
env:
|
|
REPOSITORY: ${{ inputs.github-repository }}
|
|
PACKAGE: ${{ inputs.pypi-package}}
|
|
BASE_URL: ${{ inputs.pypi-base-url}}
|
|
|