Skip to content

Commit aea396a

Browse files
Update Docker CI workflow for improved build process
1 parent 84dd929 commit aea396a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-22.04
12+
13+
permissions:
14+
contents: read
15+
packages: write
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v3
23+
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
27+
- name: Login to GitHub Container Registry
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ghcr.io
31+
username: ${{ github.actor }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Build and push Docker image
35+
uses: docker/build-push-action@v5
36+
with:
37+
context: .
38+
push: true
39+
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
40+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)