diff --git a/Dockerfile b/Dockerfile index 709c1b8..8815cab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine/k8s:1.26.1 +FROM alpine/k8s:1.26.9 COPY deploy.sh /usr/local/bin/deploy diff --git a/README.md b/README.md index 4895a60..9590404 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Following inputs can be used as `step.with` keys ```yaml - name: Deploy Helm - uses: bitovi/github-actions-deploy-eks-helm@v1.2.5 + uses: bitovi/github-actions-deploy-eks-helm@v1.2.7 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -71,7 +71,7 @@ Following inputs can be used as `step.with` keys ## Example 2 - Custom Chart Repo ```yaml - name: Deploy Helm - uses: bitovi/github-actions-deploy-eks-helm@v1.2.5 + uses: bitovi/github-actions-deploy-eks-helm@v1.2.7 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -90,7 +90,7 @@ Following inputs can be used as `step.with` keys ## Example 3 - OCI Chart Repo ```yaml - name: Deploy Helm - uses: bitovi/github-actions-deploy-eks-helm@v1.2.5 + uses: bitovi/github-actions-deploy-eks-helm@v1.2.7 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -113,7 +113,7 @@ Following inputs can be used as `step.with` keys aws-region: ${{ env.aws-region }} - name: Install Helm Chart - uses: bitovi/github-actions-deploy-eks-helm@v1.2.5 + uses: bitovi/github-actions-deploy-eks-helm@v1.2.7 with: aws-region: ${{ env.aws-region }} cluster-name: eks-cluster-${{ env.environment }} @@ -123,7 +123,7 @@ Following inputs can be used as `step.with` keys ## Example 5 - Use secrets with vals backend ```yaml - name: Deploy Helm - uses: bitovi/github-actions-deploy-eks-helm@v1.2.5 + uses: bitovi/github-actions-deploy-eks-helm@v1.2.7 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -138,11 +138,29 @@ Following inputs can be used as `step.with` keys plugins: https://github.com/jkroepke/helm-secrets ``` +## Example 6 - Use with S3 as repo +```yaml + - name: Deploy S3 Helm chart + uses: bitovi/github-actions-deploy-eks-helm@v1.2.7 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + chart-repository: s3://my-s3-bucket/ + chart-path: my-service/my-service + version: 0.1.0 + cluster-name: mycluster + namespace: dev + name: my_service_name + plugins: https://github.com/hypnoglow/helm-s3.git +``` +* See the [official AWS Guide](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/set-up-a-helm-v3-chart-repository-in-amazon-s3.html) on how to set this up. + ## Example Uninstall ```yaml - name: Deploy Helm - uses: bitovi/github-actions-deploy-eks-helm@v1.2.5 + uses: bitovi/github-actions-deploy-eks-helm@v1.2.7 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -157,7 +175,7 @@ Following inputs can be used as `step.with` keys ```yaml - name: Deploy Helm - uses: bitovi/github-actions-deploy-eks-helm@v1.2.5 + uses: bitovi/github-actions-deploy-eks-helm@v1.2.7 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/deploy.sh b/deploy.sh index ff510d0..afc042e 100644 --- a/deploy.sh +++ b/deploy.sh @@ -10,13 +10,13 @@ OCI_REGISTRY=false # Check repository type if [ -n "${HELM_REPOSITORY}" ]; then - if [[ ${HELM_REPOSITORY} =~ ^http.* ]]; then + if [[ ${HELM_REPOSITORY} =~ ^http.* ]] || [[ ${HELM_REPOSITORY} =~ ^s3.* ]]; then OCI_REGISTRY=false else if [[ ${HELM_REPOSITORY} =~ ^oci.* ]]; then OCI_REGISTRY=true else - echo "::error::Protocol handler expected here. Need http or oci." + echo "::error::Protocol handler expected here. Need http, s3 or oci." exit 1 fi fi