Skip to content

Commit

Permalink
Update restricted.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
malikparvez authored Jun 14, 2024
1 parent 73e2f5d commit be85dac
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/restricted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
- name: "Get version"
id: "get_version"
run: |
echo "version=$(jq --raw-output '.version | gsub("[^0-9.]"; "")' metadata.json)" >> $GITHUB_OUTPUT
- name: "Check version"
if: ${{ steps.get_version.outputs.version == '' }}
run: |
echo "Version is empty. Exiting workflow."
exit 1
version=$(jq --raw-output '.version | gsub("[^0-9.]"; "")' metadata.json)
if [ -z "$version" ]; then
echo "Version is empty. Exiting workflow."
failure "Failed to retrieve version from metadata.json"
else
echo "version=$version" >> $GITHUB_OUTPUT
fi
- name: "print version"
run: |
echo ${{ steps.get_version.outputs.version }}
Expand Down

0 comments on commit be85dac

Please sign in to comment.