Skip to content

Commit fd2f046

Browse files
committed
Enhance CI/CD workflow with commit verification
Added a step to fetch the `origin/main` branch with a depth of 1 in the `cd-release.yml` workflow. Introduced a step to verify that the current commit exists in the `origin/main` branch by checking if the branch contains the commit. These changes ensure consistency and validate that the release process operates on a valid commit from the main branch.
1 parent 6ecb2ee commit fd2f046

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/cd-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
with:
1515
fetch-depth: 0
1616

17+
- name: Fetch origin/main
18+
run: git fetch --no-tags origin main:refs/remotes/origin/main --depth=1
19+
1720
- name: Verify commit exists in origin/main
1821
run: git branch --remote --contains | grep origin/main
1922

0 commit comments

Comments
 (0)