File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed
Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Publish Docker Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' docker/**'
9+ - ' .github/workflows/docker-publish.yml'
10+
11+ jobs :
12+ build-and-push :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read # for checkout
16+ packages : write # to push to GHCR
17+ steps :
18+ - uses : actions/checkout@v3
19+
20+ - name : Set up QEMU (for multi-arch builds)
21+ uses : docker/setup-qemu-action@v2
22+
23+ - name : Set up Docker Buildx
24+ uses : docker/setup-buildx-action@v2
25+
26+ - name : Log in to GitHub Container Registry
27+ uses : docker/login-action@v2
28+ with :
29+ registry : ghcr.io
30+ username : ${{ github.actor }}
31+ password : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Build and push
34+ uses : docker/build-push-action@v3
35+ with :
36+ context : . # or ./docker if you keep your Dockerfile there
37+ file : ./docker/Dockerfile # adjust path if needed
38+ push : true
39+ platforms : linux/amd64,linux/arm64
40+ tags : |
41+ ghcr.io/${{ github.repository_owner }}/deep-learning-crash-course:latest
42+ ghcr.io/${{ github.repository_owner }}/deep-learning-crash-course:${{ github.sha }}
Original file line number Diff line number Diff line change 1- version : " 3.9"
21services :
32 dlcc :
43 build : .
You can’t perform that action at this time.
0 commit comments