Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MSt-10 authored Mar 11, 2024
1 parent 6b54f1f commit 0364e4b
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,26 @@ runs:
if: env.action_version == 'main'
shell: bash
run: |
curl -s ${{ github.api_url }}/repos/PalladioSimulator/Palladio-ReverseEngineering-Retriever/releases/latest \
| grep -E 'browser_download_url' \
| grep linux \
| grep x86_64 \
| grep -Eo 'https://[^\"]*' \
| xargs wget -O "${{ env.tmp_dir }}/retriever.zip"
# Execute the curl command and save its output to a variable
output=$(curl -s https://api.github.com/repos/PalladioSimulator/Palladio-ReverseEngineering-Retriever/releases/latest)
# Check if the output contains 'browser_download_url'. If not, print a warning and the output.
echo "$output" | grep 'browser_download_url' > /dev/null
if [ $? -ne 0 ]; then
echo "Warning: 'browser_download_url' not found in the curl command output."
echo "Curl command output:"
echo "$output"
exit 1
else
# If 'browser_download_url' is found, proceed with the rest of the commands.
echo "$output" | grep -E 'browser_download_url' \
| grep linux \
| grep x86_64 \
| grep -Eo 'https://[^\"]*' \
| xargs wget -O "${{ env.tmp_dir }}/retriever.zip"
fi
- name: Download Retriever
if: env.action_version != 'main'
Expand Down

0 comments on commit 0364e4b

Please sign in to comment.