File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed
Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 4343 upload_url : ${{ steps.create_release.outputs.upload_url }}
4444 asset_name : cmake-main-latest
4545 asset_path : ./build/main
46- asset_content_type : application/octet-stream
46+ asset_content_type : application/octet-stream
47+
48+ - name : Set up Docker Buildx
49+ uses : docker/setup-buildx-action@v2
50+
51+ - name : Log in to Docker Hub # help
52+ uses : docker/login-action@v2
53+ with :
54+ username : ${{ secrets.DOCKER_USERNAME }}
55+ password : ${{ secrets.DOCKER_PASSWORD }}
56+
57+ - name : Build and push Docker image
58+ run : |
59+ docker build -t ${{ secrets.DOCKER_USERNAME }}/cmake-main:latest .
60+ docker push ${{ secrets.DOCKER_USERNAME }}/cmake-main:latest
4761
Original file line number Diff line number Diff line change 1+ FROM ubuntu:latest
2+
3+ RUN apt-get update && apt-get install -y g++ cmake
4+
5+ COPY CMakeLists.txt .
6+
7+ RUN cmake -B build .
8+ RUN cmake --build build --config Release
9+
10+ EXPOSE 8089
11+
12+ CMD ["./build/main"]
Original file line number Diff line number Diff line change 1+ services :
2+ cmake-main :
3+ image : cmake-main
4+ build :
5+ context : .
6+ dockerfile : DockerFile
7+ ports :
8+ - " 8089:8089"
You can’t perform that action at this time.
0 commit comments