Skip to content

Commit 41e3b14

Browse files
committed
feat: create the ci workflow
1 parent 14ac494 commit 41e3b14

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Create WebDav Docker Image
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
TAG_NAME: ${{ github.ref_name }}
10+
11+
jobs:
12+
webdav:
13+
name: WebDav Server
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout current repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up QEMU
20+
uses: docker/setup-qemu-action@v3
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Docker meta
26+
id: meta
27+
uses: docker/metadata-action@v5
28+
with:
29+
# list of Docker images to use as base name for tags
30+
images: |
31+
${{ env.REGISTRY }}/${{ github.repository }}
32+
# generate Docker tags based on the following events/attributes
33+
tags: |
34+
type=ref,event=branch
35+
type=ref,event=pr
36+
type=semver,pattern={{version}}
37+
38+
- name: Login to Github packages
39+
uses: docker/login-action@v3
40+
with:
41+
registry: ${{ env.REGISTRY }}
42+
username: ${{ github.actor }}
43+
password: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: 📦 Build and push
46+
uses: docker/build-push-action@v6
47+
with:
48+
context: .
49+
file: ./Dockerfile
50+
push: true
51+
tags: ${{ steps.meta.outputs.tags }}
52+
labels: ${{ steps.meta.outputs.labels }}
53+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)