Merge pull request 'ci: update authentication to use GITEA_TOKEN for secure Git operations' (#4) from build/add-push-drone-pipeleine-2 into main
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
+5
-2
@@ -48,15 +48,18 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
GITEA_USERNAME:
|
GITEA_USERNAME:
|
||||||
from_secret: gitea_username
|
from_secret: gitea_username
|
||||||
GITEA_PASSWORD:
|
GITEA_TOKEN:
|
||||||
from_secret: gitea_password
|
from_secret: gitea_password
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache git sed
|
- apk add --no-cache git sed
|
||||||
|
- test -n "$GITEA_USERNAME"
|
||||||
|
- test -n "$GITEA_TOKEN"
|
||||||
- git clone https://gitea.mnky-code.de/mnky/k8s-manifests.git
|
- git clone https://gitea.mnky-code.de/mnky/k8s-manifests.git
|
||||||
- cd k8s-manifests
|
- cd k8s-manifests
|
||||||
|
- git remote set-url origin "https://${GITEA_USERNAME}:${GITEA_TOKEN}@gitea.mnky-code.de/mnky/k8s-manifests.git"
|
||||||
- 'sed -i "s|image: gitea.mnky-code.de/mnky/ngrx-playground:.*|image: gitea.mnky-code.de/mnky/ngrx-playground:${DRONE_COMMIT_SHA}|" ngrx-playground/deployment.yaml'
|
- 'sed -i "s|image: gitea.mnky-code.de/mnky/ngrx-playground:.*|image: gitea.mnky-code.de/mnky/ngrx-playground:${DRONE_COMMIT_SHA}|" ngrx-playground/deployment.yaml'
|
||||||
- git config user.name "drone"
|
- git config user.name "drone"
|
||||||
- git config user.email "drone@mnky-code.de"
|
- git config user.email "drone@mnky-code.de"
|
||||||
- git add ngrx-playground/deployment.yaml
|
- git add ngrx-playground/deployment.yaml
|
||||||
- 'git commit -m "Deploy ngrx-playground ${DRONE_COMMIT_SHA}" || exit 0'
|
- 'git commit -m "Deploy ngrx-playground ${DRONE_COMMIT_SHA}" || exit 0'
|
||||||
- 'git push https://${GITEA_USERNAME}:${GITEA_PASSWORD}@gitea.mnky-code.de/mnky/k8s-manifests.git HEAD:main'
|
- git push origin HEAD:main
|
||||||
|
|||||||
Reference in New Issue
Block a user