36 lines
1 KiB
YAML
36 lines
1 KiB
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:
|
|
pypi-package:
|
|
description: "The name of the package"
|
|
required: true
|
|
pypi-base-url:
|
|
description: "The PyPI registry URL"
|
|
required: true
|
|
github-repository:
|
|
description: "The package's GitHub repository name (owner/repo)"
|
|
required: true
|
|
unstable-branch:
|
|
description: "Whether to get a version representing the latest commit on this branch"
|
|
required: false
|
|
|
|
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 }}
|
|
BRANCH: ${{ inputs.unstable-branch }}
|
|
|