Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
debdutdeb committed Jul 19, 2023
1 parent 1260456 commit ae48362
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:
id: tag
shell: bash
run: |
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
if [[ -z ${{ inputs.tag }} ]]; then
event=${{ github.event_name }}
if [[ $event == 'workflow_dispatch' ]]; then
if [[ -z '${{ inputs.tag }}' ]]; then
tag=$(curl -s https://releases.rocket.chat/rc/info | jq .tag -r)
else
[[ -n "$(curl -s https://releases.rocket.chat/${{ inputs.tag }}/info | jq -r '.tag // empty')" ]]
elif [[ -z "$(curl -s https://releases.rocket.chat/${{ inputs.tag }}/info | jq -r '.tag // empty')" ]]; then
echo "::error::invalid tag ${{ inputs.tag }}"
exit 1
fi
fi
echo "tag: $tag"
Expand Down

0 comments on commit ae48362

Please sign in to comment.