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 fd4b18e commit 56954f7
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,29 @@ jobs:
chmod 700 get_helm.sh
./get_helm.sh
- name: Package Helm chart
- name: Install Amazon ECR Public Gallery Helm Chart CLI
run: |
# Change directories to where your chart is located
cd helm/poc
helm package .
wget https://github.com/aws/amazon-ecr-public-gallery-helm-chart-cli/releases/download/v0.1.0/amazon-ecr-public-gallery-helm-chart-cli-linux-amd64.tar.gz
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: Login to ECR (for Helm)
# - name: Package Helm chart
# run: |
# # Change directories to where your chart is located
# cd helm/poc
# helm package .

- name: Push Helm chart to ECR
run: |
aws ecr get-login-password --region eu-west-1 | helm registry login --username AWS --password-stdin ${{ secrets.ECR_REGISTRY }}
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
run: |
Expand Down

0 comments on commit 56954f7

Please sign in to comment.