Skip to content

Commit 4bf1ad3

Browse files
committed
Fix ci script when releasing nightly.
This didn't actually determine an SHA because the checkout can only happen after we determine which SHA to checkout. Specifying a URL for the repo seems to help. Signed-off-by: Gerd Zellweger <mail@gerdzellweger.com>
1 parent 2f5c395 commit 4bf1ad3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/ci-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ env:
1414
jobs:
1515
release:
1616
runs-on: ubuntu-latest
17-
env:
18-
SHA_TO_RELEASE: ${{ github.event.inputs.sha || github.sha }}
1917
steps:
20-
- name: Set SHA from main branch if scheduled
21-
if: github.event_name == 'schedule'
18+
- name: Set SHA_TO_RELEASE
2219
run: |
23-
echo "SHA_TO_RELEASE=$(git ls-remote origin refs/heads/main | cut -f1)" >> $GITHUB_ENV
20+
echo "SHA_TO_RELEASE=${{ github.event.inputs.sha || '' }}" >> $GITHUB_ENV
21+
if [ -z "${{ github.event.inputs.sha }}" ]; then
22+
echo "SHA_TO_RELEASE=${{ github.sha }}" >> $GITHUB_ENV
23+
fi
2424
2525
- name: Checkout
2626
uses: actions/checkout@v4

0 commit comments

Comments
 (0)