Skip to content

Commit 7e3e6fc

Browse files
committed
Add github action to build docker image
1 parent 1ea8d7b commit 7e3e6fc

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/docker.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build docker image
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Docker meta
15+
id: meta
16+
uses: docker/metadata-action@v5
17+
with:
18+
images: ghcr.io/${{ github.repository_owner }}/mount-ssh
19+
tags: |
20+
type=semver,pattern={{version}}
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v3
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
28+
- name: Login to GitHub Container Registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.repository_owner }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Build and push
36+
uses: docker/build-push-action@v5
37+
with:
38+
context: .
39+
platforms: linux/amd64,linux/arm64
40+
push: true
41+
tags: ${{ steps.meta.outputs.tags }}

0 commit comments

Comments
 (0)