Skip to content

Commit 288cfcb

Browse files
committed
chore: auto-build for v2
1 parent 6391574 commit 288cfcb

3 files changed

Lines changed: 53 additions & 81 deletions

File tree

.github/workflows/docker-build-latest.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/docker-build-release.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: docker-build-push
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'v2'
8+
release:
9+
types:
10+
- published
11+
12+
jobs:
13+
docker-build-push:
14+
permissions:
15+
contents: write
16+
packages: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
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: Log in to the 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: Extract metadata (tags, labels) for Docker
36+
id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: "ghcr.io/${{ github.repository }}"
40+
tags: |
41+
type=semver,pattern={{version}}
42+
type=ref,event=branch
43+
type=ref,event=pr
44+
type=sha
45+
46+
- name: Build and push
47+
uses: docker/build-push-action@v6
48+
with:
49+
context: .
50+
push: true
51+
platforms: linux/amd64,linux/arm64,linux/arm/v7
52+
tags: ${{ steps.meta.outputs.tags }}
53+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)