File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 55 types : [created]
66
77jobs :
8- build-and-publish :
8+ build-and-publish-on-pypi :
99 if : github.event_name == 'release' && github.event.action == 'created'
1010 runs-on : ubuntu-latest
1111 steps :
2323 - name : Publish package
2424 run : |
2525 hatch publish -u __token__ -a ${{ secrets.PYPI_API_TOKEN }}
26+
27+ build-and-publish-on-ghcr :
28+ if : github.event_name == 'release' && github.event.action == 'created'
29+ runs-on : ubuntu-latest
30+ env :
31+ DJANGO_SETTINGS_MODULE : tests.conf.settings.demo
32+ GHCR_IMAGE_NAME : " ghcr.io/pikhovkin/${GITHUB_REPOSITORY:10}"
33+ TAG : ${GITHUB_REF:10}
34+ steps :
35+ - uses : actions/checkout@v3
36+ - name : Docker login
37+ run : echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
38+ - name : Build the Docker image
39+ run : |
40+ docker build -f docker/Dockerfile -t ${{ env.GHCR_IMAGE_NAME }}-demo:${{ env.TAG }} .
41+ - name : Docker push
42+ run : |
43+ docker push ${{ env.GHCR_IMAGE_NAME }}-demo:${{ env.TAG }}
You can’t perform that action at this time.
0 commit comments