Skip to content

Commit

Permalink
Corrige variável
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbiasi committed Sep 2, 2021
1 parent ced75c7 commit e821a84
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ Esta GitHub Action é utilizada para fazer deploy de aplicações em Elastic Kub
clusterName: ${{ secrets.EKS_CLUSTER_STAGING }} # obrigatório
awsRegion: ${{ secrets.EKS_REGION }} # obrigatório
timeout: 120s # opcional
prewiewAppRoute: $REPOSITORY-preview-app-$VERSION.betrybe.dev # opcional
previewAppRoute: $REPOSITORY-preview-app-$VERSION.betrybe.dev # opcional
```
4 changes: 2 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
required: false
description: 'Tempo em segundos para esperar pelo health check da aplicação responder.'
default: "120s"
prewiewAppRoute:
previewAppRoute:
required: false
description: 'Regra de rota para usar em preview apps.'
default: "$REPOSITORY-preview-app-$VERSION.betrybe.dev"
Expand All @@ -27,4 +27,4 @@ runs:
EKS_CLUSTER: ${{ inputs.clusterName }}
AWS_REGION: ${{ inputs.awsRegion }}
TIMEOUT: ${{ inputs.timeout }}
PREVIEW_APP_ROUTE: ${{ inputs.prewiewAppRoute }}
PREVIEW_APP_ROUTE: ${{ inputs.previewAppRoute }}
6 changes: 3 additions & 3 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ do
done

# Defining fields according to their release type.
if [[ "$TAG" == preview-app-* ]]; then
if [[ "$IMAGE_TAG" == preview-app-* ]]; then
# Release type: Preview Apps
RELEASE_NAME="$REPOSITORY-$VERSION"
NAMESPACE="$REPOSITORY-preview-apps"
VALUES_FILE="chart/values-preview-apps.yaml"
ROUTE_OVERRIDE="--set ingressRoute.routes[0].match=\"Host(\`$PREVIEW_APP_ROUTE\`)\""

elif [[ "$TAG" == "staging" ]]; then
elif [[ "$IMAGE_TAG" == "staging" ]]; then
# Release type: Staging
RELEASE_NAME="$REPOSITORY"
NAMESPACE="$REPOSITORY"
Expand All @@ -44,7 +44,7 @@ helm upgrade $RELEASE_NAME $CHART_FILE \
--timeout $TIMEOUT \
--values $VALUES_FILE \
--set image.repository=$REPOSITORY_URI \
--set image.tag=$TAG \
--set image.tag=$IMAGE_TAG \
$ROUTE_OVERRIDE \
$SECRETS_LIST

Expand Down

0 comments on commit e821a84

Please sign in to comment.