Skip to content

Commit 89ff275

Browse files
authored
leverage github api for release tag creation (#561)
This was historically done via an external action and refactored to try and use git cli directly. However, the local repository isn't configured as desired, so using the gh cli accomplishes the same as the external action without having to manipulate the repository on the runner's disk. Signed-off-by: Jose R. Gonzalez <[email protected]>
1 parent 96ba420 commit 89ff275

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/pr-functional-tests.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,8 @@ jobs:
206206
TARGET_TAG: ${{ steps.check_version_in_PR.outputs.PR_version }}
207207
TARGET_COMMIT: ${{ steps.main_sha.outputs.origin_main_sha }}
208208
run: |
209-
git tag "${TARGET_TAG}" "${TARGET_COMMIT}"
210-
git push --force-with-lease origin "${TARGET_TAG}"
209+
gh api \
210+
--method POST \
211+
"/repos/${GITHUB_REPOSITORY}/git/refs" \
212+
-f "ref=refs/tags/${TARGET_TAG}" \
213+
-f "sha=${TARGET_COMMIT}"

0 commit comments

Comments
 (0)