File tree Expand file tree Collapse file tree 2 files changed +15
-42
lines changed
Expand file tree Collapse file tree 2 files changed +15
-42
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1313
1414jobs :
1515 deploy :
16- # if: github.event.base_ref == 'refs/heads/master'
17- # only run on staging branch
1816 name : deploy release
1917 runs-on : ubuntu-latest
2018 env :
21- FROM_TAG_PREFIX : staging-github
2219 TO_TAG_PREFIX : release-github
2320 steps :
2421 - uses : actions/checkout@v2
25- - name : show environment
26- run : env
22+ with :
23+ fetch-depth : 0
24+ - name : set target variable
25+ run : |
26+ target=$(git name-rev --refs="refs/remotes/origin/*" --name-only ${GITHUB_SHA})
27+ echo ::set-env name=TARGET::${target}
2728 - name : setup docker
2829 run : |
2930 sudo ./ci/github/helpers/setup_docker_compose.bash
3435 run : echo ::set-env name=OWNER::${GITHUB_REPOSITORY%/*}
3536 - name : set git tag
3637 run : echo ::set-env name=GIT_TAG::${GITHUB_REF##*/}
37- - name : deploy
38+ - if : env.TARGET == 'remotes/origin/master'
39+ env :
40+ FROM_TAG_PREFIX : staging-github
41+ name : deploy
42+ run : ./ci/deploy/dockerhub-tag-version.bash
43+ - if : contains(env.TARGET, 'remotes/origin/hotfix_v')
44+ env :
45+ FROM_TAG_PREFIX : hotfix-github
46+ name : deploy from hotfix image
3847 run : ./ci/deploy/dockerhub-tag-version.bash
You can’t perform that action at this time.
0 commit comments