Skip to content

Commit

Permalink
Merge pull request #21 from bluegroundltd/chore/fix-release-fetch-mai…
Browse files Browse the repository at this point in the history
…n-ref

chore(release): fetch `main` to validate tag is from commit in said ref
  • Loading branch information
chris-asl authored Dec 1, 2023
2 parents e8ad650 + 5e71657 commit 872ca9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
- name: Issue a release only if a tag is based on a merged commit in `main` branch
run: |
tag_commit=$(git rev-parse ${{ github.ref }})
git fetch -f origin main
merged_commit=$(git rev-parse main)
if git merge-base --is-ancestor $tag_commit $merged_commit; then
Expand Down

0 comments on commit 872ca9e

Please sign in to comment.