File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 update-helm :
7171 needs : build
7272 runs-on : self-hosted
73-
73+
7474 steps :
7575 - name : Checkout Helm Charts
7676 uses : actions/checkout@v3
@@ -83,11 +83,15 @@ jobs:
8383 - name : Ensure main branch is up to date
8484 run : git pull origin main
8585
86+ - name : Install yq
87+ run : |
88+ sudo apt-get update -y
89+ sudo apt-get install -y yq
90+
8691 - name : Update image tag
8792 run : |
8893 echo "Updating image tag to $IMAGE_TAG..."
89- # Using sed - works on any system
90- sed -i 's/^\([[:space:]]*tag:[[:space:]]*\).*/\1'"$IMAGE_TAG"'/' ./helm/application/values.yaml
94+ yq w -i ./helm/application/values.yaml 'app.image.tag' "$IMAGE_TAG"
9195 echo "Updated Helm values.yaml:"
9296 cat ./helm/application/values.yaml
9397 env :
97101 run : |
98102 git add ./helm/application/values.yaml
99103 git commit -m "Update Flask App image tag to $IMAGE_TAG" || echo "No changes to commit"
100- git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git main
104+ git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git main
You can’t perform that action at this time.
0 commit comments