Skip to content

Commit

Permalink
fix check tag
Browse files Browse the repository at this point in the history
  • Loading branch information
duyhenryer committed Mar 27, 2024
1 parent e642e56 commit cb6bab2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:
if: github.ref_type == 'branch' # 'branch' if regular push
run: |
echo "GITHUB_REF_NAME = $GITHUB_REF_NAME"
echo "GITHUB_SHA = $GITHUB_SHA"
short_sha=`git rev-parse --short $GITHUB_SHA`
echo "GITHUB_SHA = ${{ github.event.pull_request.head.sha }}"
short_sha=`git rev-parse --short ${{ github.event.pull_request.head.sha }}`
echo "short SHA = $short_sha"
echo candidates for branch name
git for-each-ref | grep ^$GITHUB_SHA | grep origin | grep -v HEAD
branch_name=`git for-each-ref | grep ^$GITHUB_SHA | grep origin | grep -v HEAD | head -n1 | sed "s/.*\///"`
git for-each-ref | grep ^$short_sha | grep origin | grep -v HEAD
branch_name=`git for-each-ref | grep ^$short_sha | grep origin | grep -v HEAD | head -n1 | sed "s/.*\///"`
echo tag $GITHUB_REF_NAME is on branch $branch_name
# tags and labels
Expand Down

0 comments on commit cb6bab2

Please sign in to comment.