mirror of
https://github.com/daeuniverse/dae.git
synced 2025-01-03 13:31:00 +07:00
ci/fix(seed-build): catch non-pr condition (#210)
This commit is contained in:
parent
39ddd480f9
commit
6dad0a2d86
4
.github/workflows/seed-build.yml
vendored
4
.github/workflows/seed-build.yml
vendored
@ -75,16 +75,16 @@ jobs:
|
||||
id: get_version
|
||||
env:
|
||||
REF: ${{ inputs.ref }}
|
||||
PR: pr-${{ inputs.pr_number }}
|
||||
run: |
|
||||
date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
|
||||
commit=$(echo ${REF} | cut -c1-6)
|
||||
if [[ "${{ inputs.pr_build }}" == "true" ]]; then
|
||||
count=$(git rev-list --count origin/main..HEAD)
|
||||
version="unstable-${date}.pr-${{ inputs.pr_number }}.r${count}.${commit}"
|
||||
else
|
||||
count=$(git rev-list --count HEAD)
|
||||
version="unstable-${date}.r${count}.${commit}"
|
||||
fi
|
||||
version="unstable-${date}.${PR}.r${count}.${commit}"
|
||||
echo "VERSION=${version}" >> $GITHUB_OUTPUT
|
||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user