File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -126,3 +126,30 @@ jobs:
126126 user : __token__
127127 password : ${{ secrets.PYPI_API_TOKEN }}
128128 verbose : true # For debugging 'twine upload' if a problem occurs.
129+
130+ deploy_docker :
131+ needs : tests
132+ if : ${{ success() && (contains(github.ref, 'refs/tags') || github.ref == 'refs/heads/master') }}
133+ runs-on : ubuntu-latest
134+ steps :
135+ - uses : actions/checkout@v2
136+ with :
137+ fetch-depth : " 0"
138+ - name : Get Tag Version
139+ id : version
140+ shell : bash
141+ run : |
142+ if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then
143+ echo "::set-output name=TAG_VERSION::latest"
144+ else
145+ echo "::set-output name=TAG_VERSION::${GITHUB_REF##*/}"
146+ fi
147+ - name : Login to DockerHub
148+ uses : docker/login-action@v1
149+ with :
150+ username : ${{ secrets.DOCKERHUB_USERNAME }}
151+ password : ${{ secrets.DOCKERHUB_TOKEN }}
152+ - name : Build Docker
153+ run : make APP_VERSION=${{ steps.version.outputs.TAG_VERSION }} docker-build
154+ - name : Push to DockerHub
155+ run : make APP_VERSION=${{ steps.version.outputs.TAG_VERSION }} docker-push
You can’t perform that action at this time.
0 commit comments