Compare commits

..

2 Commits

Author SHA1 Message Date
khwezi 87bfc65b34 Merge pull request 'Added git tag and release step to package' (#8) from migration into master
Reviewed-on: #8
2026-05-10 08:38:40 +02:00
Khwezi Mngoma aef2884e8e Added git tag and release step to package
continuous-integration/drone/pr Build is failing
2026-05-10 08:38:10 +02:00
+18 -3
View File
@@ -31,20 +31,35 @@ steps:
registry: nexus.khongisa.co.za registry: nexus.khongisa.co.za
repo: nexus.khongisa.co.za/litecharms-scheduler repo: nexus.khongisa.co.za/litecharms-scheduler
tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ] tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ]
custom_labels:
- org.opencontainers.image.source=https://gitea.khongisa.co.za/litecharms/scheduler
- org.opencontainers.image.version=1.${DRONE_BUILD_NUMBER}
- org.opencontainers.image.revision=${DRONE_COMMIT_SHA}
username: { from_secret: docker_username } username: { from_secret: docker_username }
password: { from_secret: docker_password } password: { from_secret: docker_password }
- name: gitea-tag - name: gitea-tag-release
image: alpine/git image: alpine/git
environment: environment:
GITEA_TOKEN: { from_secret: git_token }
GITEA_USER: { from_secret: git_username } GITEA_USER: { from_secret: git_username }
GITEA_PASS: { from_secret: git_password } GITEA_PASS: { from_secret: git_password }
commands: commands:
- git config --global user.email "drone@litecharms.co.za"
- git config --global user.name "Drone CI"
- git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/scheduler.git - git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/scheduler.git
- git tag 1.${DRONE_BUILD_NUMBER} - git tag 1.${DRONE_BUILD_NUMBER}
- git push origin 1.${DRONE_BUILD_NUMBER} - git push origin 1.${DRONE_BUILD_NUMBER}
- |
curl -X POST "https://gitea.khongisa.co.za/api/v1/repos/litecharms/scheduler/releases" \
-H "Authorization: token $${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"1.${DRONE_BUILD_NUMBER}\",
\"target_commitish\": \"${DRONE_COMMIT_SHA}\",
\"name\": \"Release 1.${DRONE_BUILD_NUMBER}\",
\"body\": \"### Artifacts\n* **Docker Image:** nexus.khongisa.co.za/litecharms-scheduler:1.${DRONE_BUILD_NUMBER}\n* **NuGet:** [View on Nexus](https://nexus.khongisa.co.za/repository/nuget-group/)\",
\"draft\": false,
\"prerelease\": false
}"
depends_on: depends_on:
- build - build