Skip to content

Commit

Permalink
CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeniu Goncearuc committed Sep 29, 2023
1 parent 56954f7 commit d924350
Showing 1 changed file with 11 additions and 23 deletions.
34 changes: 11 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,29 +91,17 @@ jobs:
tar -xzvf amazon-ecr-public-gallery-helm-chart-cli-linux-amd64.tar.gz
sudo mv amazon-ecr-public-gallery-helm-chart-cli-linux-amd64/helm-ecr /usr/local/bin
# - name: Package Helm chart
# run: |
# # Change directories to where your chart is located
# cd helm/poc
# helm package .

- name: Push Helm chart to ECR
- name: Package Helm chart
run: |
export CHART=nodejs
export VERSION=${{ env.TAG_NAME }}
helm ecr login ${{ secrets.ECR_REGISTRY }} --username AWS --password-stdin "$(aws ecr get-login-password --region eu-west-1)"
helm package $CHART
helm ecr push ${{ secrets.ECR_REGISTRY }}/$CHART:$VERSION $CHART-$VERSION.tgz
#
# - name: Login to ECR (for Helm)
# run: |
# aws ecr get-login-password --region eu-west-1 | helm registry login --username AWS --password-stdin ${{ secrets.ECR_REGISTRY }}

- name: Push Helm chart to ECR
# Change directories to where your chart is located
cd helm/poc
helm package .
- name: Login to ECR (for Helm)
run: |
# Adjust the chart and version accordingly
CHART_NAME=nodejs
CHART_VERSION=${{ env.TAG_NAME }}
helm chart save $CHART_NAME-$CHART_VERSION.tgz ${{ secrets.ECR_REGISTRY }}/$CHART_NAME:$CHART_VERSION
helm chart push ${{ secrets.ECR_REGISTRY }}/$CHART_NAME:$CHART_VERSION
aws ecr get-login-password --region eu-west-1 | helm registry login --username AWS --password-stdin ${{ secrets.ECR_REGISTRY }}
- name: Push helm chart to ECR
run: |
helm push poc-${{ env.TAG_NAME }}.tgz oci://${{ secrets.ECR_REGISTRY }}

0 comments on commit d924350

Please sign in to comment.