File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Docker
22
33on :
4- push :
5- branches : [main]
6- paths :
7- - ' Dockerfile'
8- - ' docker-entrypoint.sh'
9- - ' .dockerignore'
10- - ' sidemantic/**'
11- - ' pyproject.toml'
12- pull_request :
13- paths :
14- - ' Dockerfile'
15- - ' docker-entrypoint.sh'
16- - ' .dockerignore'
17- - ' sidemantic/**'
18- - ' pyproject.toml'
4+ workflow_dispatch :
5+ workflow_run :
6+ workflows : ["Publish to PyPI"]
7+ types : [completed]
198
209env :
2110 IMAGE : sidequery/sidemantic
2211
2312jobs :
2413 docker :
25- name : Docker build and test
14+ name : Docker build, test, and push
2615 runs-on : ubuntu-latest
16+ if : ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
2717
2818 steps :
2919 - uses : actions/checkout@v4
20+ with :
21+ ref : main
3022
3123 - name : Set up Docker Buildx
3224 uses : docker/setup-buildx-action@v3
3325
3426 - name : Login to Docker Hub
35- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
3627 uses : docker/login-action@v3
3728 with :
3829 username : ${{ secrets.DOCKERHUB_USERNAME }}
9081 run : docker stop sidemantic-test || true
9182
9283 - name : Push to Docker Hub
93- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
9484 uses : docker/build-push-action@v6
9585 with :
9686 context : .
You can’t perform that action at this time.
0 commit comments