File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,24 @@ jobs:
16
16
python-version : ' 3.6'
17
17
- name : Setup git
18
18
run :
git config --global user.email "[email protected] " && git config --global user.name "Github Action"
19
- - name : Install Chartpress
19
+ - name : Install Chartpress and some python modules
20
20
run : |
21
- pip install -v chartpress && pip install six
21
+ pip install -v chartpress && pip install six && pip install jq
22
+ - name : Set env vars for publish charts
23
+ run : |
24
+ GIT_BRANCH_NAME=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
25
+ GIT_BRANCH_NAME=${GIT_BRANCH_NAME/\//_}
26
+ OSM_SEED_VERSION=$(jq -r '.version' < package.json)
27
+ echo "GIT_BRANCH_NAME=$GIT_BRANCH_NAME" >> $GITHUB_ENV
28
+ echo "OSM_SEED_VERSION=$OSM_SEED_VERSION" >> $GITHUB_ENV
22
29
- name : Run Chartpress
23
- run : chartpress --push --publish-chart
24
30
env :
25
31
GITHUB_TOKEN : ${{ secrets.REPO_TOKEN }}
26
-
32
+ GITHUB_EVENT_NAME : ${{ github.event_name }}
33
+ run : |
34
+ if [[ $GIT_BRANCH_NAME = "develop" && $GITHUB_EVENT_NAME = "push" ]]
35
+ then
36
+ chartpress --push --publish-chart --tag ${OSM_SEED_VERSION}
37
+ else
38
+ chartpress --push --publish-chart
39
+ fi
You can’t perform that action at this time.
0 commit comments