feat: add check action
This commit is contained in:
parent
ee1dcf4a21
commit
7d61f93ac1
4 changed files with 32 additions and 83 deletions
32
action.yaml
Normal file
32
action.yaml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
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}}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue