Skip to content

Commit

Permalink
Update ci-cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
varunsh-coder committed Jan 8, 2024
1 parent 38a4a0c commit 561b60f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ jobs:
env:
DOCKER_CLI_EXPERIMENTAL: enabled
run: |
exists='false'
if docker manifest inspect '${{ steps.action.outputs.image }}'
then
echo "exists=true" >>$GITHUB_OUTPUT
else
echo "exists=false" >>$GITHUB_OUTPUT
exists='true'
fi
echo "exists=$exists" >>$GITHUB_OUTPUT
shell: bash

deploy:
Expand Down Expand Up @@ -147,8 +147,8 @@ jobs:
id: check_conditions
run: |
should_push_value='false'
if [[ ${{ github.event_name }} == 'push' ]]; then
if [[ ${{ startsWith(github.ref, 'refs/heads/main') }} && ${{ !needs.config-deploy.outputs.image-exists }} ]]
if [[ '${{ github.event_name }}' == 'push' ]]; then
if [[ ${{ startsWith(github.ref, 'refs/heads/main') }} && ${{ needs.config-deploy.outputs.image-exists }} != 'true' ]]; then
should_push_value='true'
fi
fi
Expand Down

0 comments on commit 561b60f

Please sign in to comment.