Skip to content

Commit 2156838

Browse files
automatic git tag addition
1 parent 981ccce commit 2156838

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

codefresh.yml

+16
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,22 @@ steps:
7878
stage: release
7979
steps:
8080

81+
add_git_tag:
82+
title: "Adding Git tag..."
83+
stage: release
84+
image: codefreshio/ci-helpers
85+
commands:
86+
- source /get-token/get-gh-token.sh
87+
- |
88+
curl --fail -X POST -d '{"ref": "refs/tags/${{SERVICE_VERSION}}","sha": "${{CF_REVISION}}"}' -H "Content-Type: application/json" -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}/git/refs
89+
when:
90+
branch:
91+
only: [master]
92+
steps:
93+
- name: validate_version
94+
on:
95+
- success
96+
8197
push_image_prod:
8298
type: push
8399
title: "Pushing the image to the public registry..."

0 commit comments

Comments
 (0)