Skip to content

Commit

Permalink
ci repair
Browse files Browse the repository at this point in the history
  • Loading branch information
kalisio-nicolas committed Jan 4, 2024
1 parent 6be1b5c commit b0c9124
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -45,19 +45,19 @@ jobs:
CHART_FILE=$(find . -name '*.tgz' -print -quit)
CHART_NAME=$(echo "$CHART_FILE" | sed 's/-[0-9]\+\.[0-9]\+\.[0-9]\+\.tgz$//')
echo "curl -s --data-binary \"@${CHART_FILE}\" \
--url \"http://15.188.14.1:8085/api/charts\" \
--url \"http://${{ secrets.HELM_REPO }}/api/charts\" \
--header \"Authorization: Basic ${{ secrets.HELM_REPO_AUTH }}\""
RESPONSE=$(curl -s --data-binary "@${CHART_FILE}" \
--url "http://15.188.14.1:8085/api/charts" \
--url "http://${{ secrets.HELM_REPO }}/api/charts" \
--header "Authorization: Basic ${{ secrets.HELM_REPO_AUTH }}")
if [[ $RESPONSE == '{"saved":true}' ]]; then
echo "Chart successfully published."
elif [[ $RESPONSE == '{"error":"file already exists"}' ]]; then
echo "Chart already exists. Deleting and republishing..."
DELETE_RESPONSE=$(curl -s -X DELETE "http://15.188.14.1:8085/api/charts/$CHART_NAME/$VERSION" \
DELETE_RESPONSE=$(curl -s -X DELETE "http://${{ secrets.HELM_REPO }}/api/charts/$CHART_NAME/$VERSION" \
--header "Authorization: Basic ${{ secrets.HELM_REPO_AUTH }}")
if [[ $DELETE_RESPONSE == '{"deleted":true}' ]]; then

0 comments on commit b0c9124

Please sign in to comment.