Skip to content

Commit 5cd64f1

Browse files
committed
ci(deploy): skip deploy when App Service secrets are empty; remove redundant assertions
1 parent 8feb838 commit 5cd64f1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

.github/workflows/docker-deploy.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,14 @@ jobs:
4848
docker push ${{ steps.registry.outputs.registry }}/app-scripting-editor-api:latest
4949
5050
deploy-to-appservice:
51-
if: ${{ secrets.EDITOR_APP_NAME && secrets.RESOURCE_GROUP && secrets.EDITOR_API_APP_NAME }}
51+
if: ${{ secrets.EDITOR_APP_NAME != '' && secrets.RESOURCE_GROUP != '' && secrets.EDITOR_API_APP_NAME != '' }}
5252
needs: build-and-push
5353
runs-on: ubuntu-latest
5454
steps:
5555
- name: Azure Login
5656
uses: azure/login@v1
5757
with:
5858
creds: ${{ secrets.AZURE_CREDENTIALS }}
59-
- name: Assert required App Service secrets are set
60-
run: |
61-
if [ -z "${{ secrets.EDITOR_APP_NAME }}" ]; then echo "ERROR: secrets.EDITOR_APP_NAME is not set"; exit 1; fi
62-
if [ -z "${{ secrets.RESOURCE_GROUP }}" ]; then echo "ERROR: secrets.RESOURCE_GROUP is not set"; exit 1; fi
63-
if [ -z "${{ secrets.EDITOR_API_APP_NAME }}" ]; then echo "ERROR: secrets.EDITOR_API_APP_NAME is not set"; exit 1; fi
6459

6560
- name: Deploy editor to App Service (container)
6661
run: |

0 commit comments

Comments
 (0)