Skip to content

Commit 0b8e61e

Browse files
author
Rub21
committed
Add tag for osm-seed version
1 parent dfab20d commit 0b8e61e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/chartpress.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ jobs:
2424
GIT_BRANCH_NAME=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
2525
GIT_BRANCH_NAME=${GIT_BRANCH_NAME/\//_}
2626
OSM_SEED_VERSION=$(jq -r '.version' < package.json)
27+
SHORT_GITHUB_SHA=${GITHUB_SHA::7}
2728
echo "GIT_BRANCH_NAME=$GIT_BRANCH_NAME" >> $GITHUB_ENV
2829
echo "OSM_SEED_VERSION=$OSM_SEED_VERSION" >> $GITHUB_ENV
30+
echo "SHORT_GITHUB_SHA=$SHORT_GITHUB_SHA" >> $GITHUB_ENV
2931
- name: Run Chartpress
3032
env:
3133
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
3234
GITHUB_EVENT_NAME: ${{ github.event_name }}
3335
run: |
34-
if [[ $GIT_BRANCH_NAME = "develop" && $GITHUB_EVENT_NAME = "push" ]]
36+
TAG=dev
37+
if [[ $GIT_BRANCH_NAME = "main" && $GITHUB_EVENT_NAME = "push" ]]
3538
then
36-
chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}
37-
else
38-
chartpress --push --publish-chart
39+
TAG=stable
3940
fi
41+
chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}-$TAG.h$SHORT_GITHUB_SHA

0 commit comments

Comments
 (0)