Skip to content

Commit 320085b

Browse files
committed
Introduce GitHub Actions
1 parent fa32cff commit 320085b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v4
15+
-
16+
name: Docker meta
17+
id: meta
18+
uses: docker/metadata-action@v5
19+
with:
20+
images: |
21+
guessi/dnsperf
22+
tags: |
23+
type=semver,pattern={{version}}
24+
25+
# set latest tag for default branch
26+
type=raw,value=latest,enable={{is_default_branch}}
27+
-
28+
name: Set up QEMU
29+
uses: docker/setup-qemu-action@v3
30+
-
31+
name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
-
34+
name: Login to DockerHub
35+
if: github.event_name != 'pull_request'
36+
uses: docker/login-action@v3
37+
with:
38+
username: ${{ secrets.DOCKERHUB_USERNAME }}
39+
password: ${{ secrets.DOCKERHUB_TOKEN }}
40+
-
41+
name: Build and push
42+
uses: docker/build-push-action@v5
43+
with:
44+
platforms: linux/amd64,linux/arm64
45+
context: .
46+
push: ${{ github.event_name != 'pull_request' }}
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)