Skip to content

Commit c1beda6

Browse files
committed
fix version
1 parent 2b6487e commit c1beda6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
outputs:
3838
sha_short: ${{ steps.vars.outputs.sha }}
3939
repo_name: ${{ steps.vars.outputs.repo }}
40+
version: ${{ steps.vars.outputs.version }}
4041
steps:
4142
- name: Checkout Repository
4243
uses: actions/checkout@v3
@@ -45,6 +46,7 @@ jobs:
4546
run: |
4647
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | cut -c1-7)"
4748
echo "::set-output name=repo::$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2)"
49+
echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"
4850
4951
build:
5052
name: Build Image
@@ -92,12 +94,11 @@ jobs:
9294
- name: Output Variables
9395
id: var
9496
run: |
95-
version=${{ steps.meta.outputs.version }}
97+
version=latest
9698
if ${{ startsWith(github.ref, 'refs/tags/') }}; then
97-
operator_version=v$version
99+
operator_version=v${{ needs.vars.outputs.version }}
98100
else
99-
tag=$(git describe --tags --abbrev=0)
100-
operator_version=$tag-$version-${{ needs.vars.outputs.sha_short }}
101+
operator_version=$version-${{ needs.vars.outputs.sha_short }}
101102
fi
102103
echo "::set-output name=version::$operator_version"
103104
- name: Build Image

0 commit comments

Comments
 (0)