diff --git a/.drone.yml b/.drone.yml index 7a6ba4d..a3839ea 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,10 +39,12 @@ steps: commands: - apk --update add curl jq - URL="$GIT_URL/api/v1/repos/$REPO/contents/$FILE_PATH" - - echo $URL - | SHA=$(curl -s -H "Authorization: token $TOKEN" -H "Accept: application/json" $URL | jq -r '.sha') - - echo $SHA + ZONE=$(cat /drone/src/install.sh | base64 -w0) + DATA=$(printf '{"message": "Modifying install.sh", "sha": "'$SHA'", "content": "%s", "branch": "main"}' "$ZONE") + curl -X PUT -s -H "Authorization: token $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" -d "$DATA" $URL + echo $ZONE when: branch: