Skip to content

Commit 3fb24ee

Browse files
committed
Docker image build workflow
1 parent 53b5c58 commit 3fb24ee

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/docker.yml

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

0 commit comments

Comments
 (0)