File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 runs-on : ubuntu-latest
1414
1515 steps :
16- - uses : actions/checkout@v3
16+ - name : Checkout
17+ uses : actions/checkout@v3
1718
1819 - name : Set up Python
1920 uses : actions/setup-python@v3
3536 with :
3637 user : __token__
3738 password : ${{ secrets.TEST_PYPI_API_TOKEN }}
38- repository_url : https://test.pypi.org/legacy/
39+ repository_url : https://test.pypi.org/legacy/
40+
41+ deploy-docker :
42+ runs-on : ubuntu-latest
43+ if : github.ref_type == 'tag'
44+
45+ needs : deploy-pypi
46+ steps :
47+ - name : Checkout
48+ uses : actions/checkout@v3
49+
50+ - name : Login to Docker Hub
51+ uses : docker/login-action@v2
52+ with :
53+ username : ${{ secrets.DOCKER_USER }}
54+ password : ${{ secrets.DOCKER_TOKEN }}
55+
56+ - name : Extract metadata (tags, labels) for Docker
57+ id : meta
58+ uses : docker/metadata-action@v4
59+ with :
60+ images : sancherepan/repo-reader
61+ flavor : latest=true
62+ tags : type=semver,pattern={{version}}
63+
64+
65+ - name : Build and push
66+ uses : docker/build-push-action@v3
67+ with :
68+ context : .
69+ file : docker/Dockerfile
70+ push : true
71+ tags : ${{ steps.meta.outputs.tags }}
72+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments