Skip to content

Commit e1a80f4

Browse files
committed
u
1 parent 31e3705 commit e1a80f4

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 }}

docker/docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.9"
21
services:
32
dlcc:
43
build: .

0 commit comments

Comments
 (0)