replaced correct variable name to content
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -41,8 +41,8 @@ steps:
|
|||||||
- URL="$GIT_URL/api/v1/repos/$REPO/contents/$FILE_PATH"
|
- URL="$GIT_URL/api/v1/repos/$REPO/contents/$FILE_PATH"
|
||||||
- |
|
- |
|
||||||
SHA=$(curl -s -H "Authorization: token $TOKEN" -H "Accept: application/json" $URL | jq -r '.sha')
|
SHA=$(curl -s -H "Authorization: token $TOKEN" -H "Accept: application/json" $URL | jq -r '.sha')
|
||||||
ZONE=$(cat /drone/src/install.sh | base64 -w0)
|
CONTENT=$(cat /drone/src/install.sh | base64 -w0)
|
||||||
DATA=$(printf '{"message": "Modifying install.sh", "sha": "'$SHA'", "content": "%s", "branch": "main"}' "$ZONE")
|
DATA=$(printf '{"message": "Modifying install.sh", "sha": "'$SHA'", "content": "%s", "branch": "main"}' "$CONTENT")
|
||||||
curl -X PUT -s -H "Authorization: token $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" -d "$DATA" $URL
|
curl -X PUT -s -H "Authorization: token $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" -d "$DATA" $URL
|
||||||
|
|
||||||
when:
|
when:
|
||||||
|
Reference in New Issue
Block a user