Skip to content

Commit

Permalink
✨ Try using GHA env var directly
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahElliott committed Oct 23, 2023
1 parent 6c88fea commit 3f45a2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/zsh-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
run: echo "CAPT_VERBOSE=1" >> $GITHUB_ENV
- name: Set capt main branch
run: echo "CAPT_MAIN_BRANCH=${{github.head_ref}}" >> $GITHUB_ENV
- name: Show env
run: env
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
Expand Down
7 changes: 4 additions & 3 deletions capt
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,10 @@ setup_changes() {
print
print " "
# CAPT_MAIN_BRANCH=origin/main
if [[ -n $CAPT_MAIN_BRANCH ]]; then
print "Using $CAPT_MAIN_BRANCH as upstream since in integration mode."
upstream=$CAPT_MAIN_BRANCH
# if [[ -n $CAPT_MAIN_BRANCH ]]; then
if [[ -n $GITHUB_HEAD_REF ]]; then
print "Using $GITHUB_HEAD_REF as upstream since in integration mode."
upstream=origin/main # FIXME
else
# Fast and inaccurate https://stackoverflow.com/a/50056710/326516
# main_branch=$(git branch | sgrep '*' | cut -f2 -d' ')
Expand Down

0 comments on commit 3f45a2e

Please sign in to comment.