Skip to content

Commit

Permalink
clean up and minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuangnm authored and dhuangnm committed Sep 20, 2024
1 parent b439b41 commit aea9786
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
14 changes: 8 additions & 6 deletions actions/get-pypi-latest-versions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,20 @@ outputs:
runs:
using: composite
steps:
- id: getpypi
run: |
set -x
- name: get package versions from pypi
id: getpypi
shell: bash
run: |-
URL="https://pypi.org/project/${{ inputs.package_name }}/#history"
curl --header 'Accept: application/vnd.pypi.simple.v1+json' ${URL} > history.log
all=`cat history.log | grep 'release__card' | sed 's/.*project\///g' | cut -d'/' -f2`
latest=${{ inputs.num_of_latest }}
if [[ -z "${{ inputs.num_of_latest }}" ]]; then
latest=1
fi
echo "all=${all}"
versions=`echo "${all}" | head -${latest}`
echo "versions=${versions}"
echo "versions=${versions}" >> "$GITHUB_OUTPUT"
set +x
shell: bash
if [ -z "${versions}" ]; then
exit 1
fi
5 changes: 0 additions & 5 deletions actions/verify-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ inputs:
description: version of python to verify, e.g. 3.10
required: true

outputs:
version:
description: result from 'python --version'
value: ${{ steps.env_python.outputs.version }}

runs:
using: composite
steps:
Expand Down

0 comments on commit aea9786

Please sign in to comment.