Skip to content

Commit

Permalink
Update leap-catalog action to use run.sh script with input parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 committed May 6, 2024
1 parent f857a2b commit b299e3e
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions leap-catalog/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,5 @@ runs:
using: "composite"
steps:
- run: |
set -e
echo "🔄 Initializing LEAP Catalog Action..."
echo "Arguments: version=$1, validation-path=$2, single-feedstock=$3, generation-path=$4, output-directory=$5"
echo "🔍 Installing package version: $1"
python -m pip install "leap-data-management-utils[complete]==$1" || { echo "Specific version installation failed"; exit 1; }
# Validate or generate based on input arguments
if [ -n "$3" ]; then
echo "🔍 Validating single feedstock: $3"
leap-catalog validate --single "$3" || { echo "Validation failed for single feedstock"; exit 1; }
elif [ -n "$2" ]; then
echo "🔍 Validating feedstocks from: $2"
leap-catalog validate --path "$2" || { echo "Validation failed for feedstocks"; exit 1; }
elif [ -n "$4" ] && [ -n "$5" ]; then
echo "🔍 Generating catalog from: $4 to $5"
leap-catalog generate --path "$4" --output "$5" || { echo "Catalog generation failed"; exit 1; }
else
echo "⚠️ No valid action specified. Please check input parameters."
exit 1
fi
exit 0
./run.sh "${{ inputs.version }}" "${{ inputs.validation-path }}" "${{ inputs.single-feedstock }}" "${{ inputs.generation-path }}" "${{ inputs.output-directory }}"
shell: bash

0 comments on commit b299e3e

Please sign in to comment.