mirror of
https://github.com/daeuniverse/dae.git
synced 2025-01-05 13:08:57 +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
|
id: get_version
|
||||||
env:
|
env:
|
||||||
REF: ${{ inputs.ref }}
|
REF: ${{ inputs.ref }}
|
||||||
PR: pr-${{ inputs.pr_number }}
|
|
||||||
run: |
|
run: |
|
||||||
date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
|
date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
|
||||||
commit=$(echo ${REF} | cut -c1-6)
|
commit=$(echo ${REF} | cut -c1-6)
|
||||||
if [[ "${{ inputs.pr_build }}" == "true" ]]; then
|
if [[ "${{ inputs.pr_build }}" == "true" ]]; then
|
||||||
count=$(git rev-list --count origin/main..HEAD)
|
count=$(git rev-list --count origin/main..HEAD)
|
||||||
|
version="unstable-${date}.pr-${{ inputs.pr_number }}.r${count}.${commit}"
|
||||||
else
|
else
|
||||||
count=$(git rev-list --count HEAD)
|
count=$(git rev-list --count HEAD)
|
||||||
|
version="unstable-${date}.r${count}.${commit}"
|
||||||
fi
|
fi
|
||||||
version="unstable-${date}.${PR}.r${count}.${commit}"
|
|
||||||
echo "VERSION=${version}" >> $GITHUB_OUTPUT
|
echo "VERSION=${version}" >> $GITHUB_OUTPUT
|
||||||
echo "VERSION=${version}" >> $GITHUB_ENV
|
echo "VERSION=${version}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user