Skip to content

Commit

Permalink
fix: update image version variable usage in deployment workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinebrasil committed Dec 8, 2024
1 parent b7e057d commit 613d779
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ jobs:
# Check if namespace exists, if not create it
kubectl get namespace $ENVIRONMENT || kubectl create namespace $ENVIRONMENT
kustomize edit set image web=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_VERSION
kustomize edit set image web=$ECR_REGISTRY/$ECR_REPOSITORY:${{ env.image-version }}
echo "Deploying resource in $ENVIRONMENT namespace."
echo "Using image version: $IMAGE_VERSION"
echo "Using image version: ${{ env.image-version }}"
echo "Fully qualified image name: $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.image-version }}"
kubectl apply -k $KUSTOMIZE_DIR -n $ENVIRONMENT && echo "Resources deployed successfully!" || { echo "Failed to deploy resources! Check the logs"; kubectl describe pods -n $ENVIRONMENT; exit 1; }
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ jobs:
echo "Version $NEW_VERSION already exists in CHANGELOG.md. Skipping update."
fi
# - name: Commit and push updated version in CHANGELOG.md
# env:
# NEW_VERSION: ${{ steps.semver-tag.outputs.semver_tag }}
# run: |
# git config user.name "github-actions[bot]"
# git config user.email "github-actions[bot]@users.noreply.github.com"
# git add CHANGELOG.md VERSION
# git commit -m "ci: bump version to ${{ env.NEW_VERSION }}"
# git push origin ${{ github.ref }}
- name: Commit and push updated version in CHANGELOG.md
env:
NEW_VERSION: ${{ steps.semver-tag.outputs.semver_tag }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add CHANGELOG.md VERSION
git commit -m "ci: bump version to ${{ env.NEW_VERSION }}"
git push origin ${{ github.ref }}
- name: Setup Kubeconfig
run: aws eks --region $AWS_REGION update-kubeconfig --name $EKS_CLUSTER_NAME
Expand Down

0 comments on commit 613d779

Please sign in to comment.