diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99b988b..0a4d2a3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,8 +46,8 @@ jobs: echo "SHORT_SHA=${SHORT_SHA}" >> $GITHUB_ENV echo "LATEST_REPO_TAG=${LATEST_REPO_TAG}" >> $GITHUB_ENV - sudo wget https://github.com/mikefarah/yq/releases/download/3.4.0/yq_linux_amd64 -O /usr/bin/yq - sudo chmod +x /usr/bin/yq + sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 + sudo chmod +x /usr/local/bin/yq curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash @@ -55,8 +55,8 @@ jobs: run: | set -e cd chart - yq w -i ${CHART_NAME}/Chart.yaml version ${CHART_VERSION} - yq w -i ${CHART_NAME}/Chart.yaml appVersion ${CONTAINER_VERSION} + yq e -i ".version = \"${CHART_VERSION}\"" ${CHART_NAME}/Chart.yaml + yq e -i ".appVersion = \"${CONTAINER_VERSION}\"" ${CHART_NAME}/Chart.yaml - name: Build, tag, and push panel image to DockerHub run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3b6fed..5d6f02c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,8 +41,8 @@ jobs: echo $SHORT_SHA echo $LATEST_REPO_TAG - sudo wget https://github.com/mikefarah/yq/releases/download/3.4.0/yq_linux_amd64 -O /usr/bin/yq - sudo chmod +x /usr/bin/yq + sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 + sudo chmod +x /usr/local/bin/yq curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash @@ -50,8 +50,8 @@ jobs: run: | set -e cd chart - yq w -i ${CHART_NAME}/Chart.yaml version ${CHART_VERSION} - yq w -i ${CHART_NAME}/Chart.yaml appVersion ${CONTAINER_VERSION} + yq e -i ".version = \"${CHART_VERSION}\"" ${CHART_NAME}/Chart.yaml + yq e -i ".appVersion = \"${CONTAINER_VERSION}\"" ${CHART_NAME}/Chart.yaml - name: Build, tag, and push panel image to Amazon ECR run: | @@ -97,7 +97,8 @@ jobs: git clone https://x-access-token:${BOT_TOKEN}@github.com/${CENTRAL_REPOSITORY}.git /tmp/central-repo cd /tmp/central-repo - yq e ".releases[] | select(.name == \"code-server\") | .version = \"${CHART_VERSION}\"" helmfiles/coding/helmfile.yaml + pip3 install ruamel.yaml + ./upgrade.py -p helmfiles/coding/helmfile.yaml -n code-server -v ${CHART_VERSION} git config --global user.email "${BOT_EMAIL}" git config --global user.name "${BOT_USERNAME}"