We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6651e03 commit aea9d52Copy full SHA for aea9d52
1 file changed
.github/workflows/ci.yaml
@@ -59,7 +59,9 @@ jobs:
59
env:
60
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61
run: |
62
- DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
+ REPO_NAME=$(echo $GITHUB_REPOSITORY | sed 's/^.*\///')
63
+ DEFAULT_BRANCH=$(curl -H "Authorization: token $GITHUB_TOKEN" \
64
+ "https://api.github.com/repos/$GITHUB_REPOSITORY" | jq -r '.default_branch')
65
66
echo "Default branch = $DEFAULT_BRANCH"
67
echo "Current SHA = ${{ github. sha }}"
0 commit comments