added install sh push to local-install repo
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
gyurix
2024-06-13 16:37:34 +02:00
parent df37f7f760
commit 43efebecc3

View File

@@ -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: