Skip to content

Commit 4c2cfb6

Browse files
mschmidt291voigt
authored andcommitted
Add branch to workflow push
Signed-off-by: Max Schmidt <[email protected]>
1 parent 761fbdf commit 4c2cfb6

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ main, kwasm-lifecycle-manager ]
6+
tags: [ '*' ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
env:
11+
REGISTRY: ghcr.io
12+
IMAGE_NAME: ${{ github.repository }}
13+
14+
jobs:
15+
buildx:
16+
runs-on: ubuntu-latest
17+
steps:
18+
-
19+
name: Checkout
20+
uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 0
23+
-
24+
name: Set up QEMU
25+
uses: docker/setup-qemu-action@v1
26+
-
27+
name: Set up Docker Buildx
28+
id: buildx
29+
uses: docker/setup-buildx-action@v1
30+
-
31+
name: Log in to the Container registry
32+
uses: docker/login-action@v1
33+
with:
34+
registry: ${{ env.REGISTRY }}
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
-
38+
name: Extract metadata (tags, labels) for Docker
39+
id: meta
40+
uses: docker/metadata-action@v3
41+
with:
42+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43+
-
44+
name: Build and push Docker image
45+
uses: docker/build-push-action@v2
46+
with:
47+
context: .
48+
push: true
49+
platforms: linux/amd64,linux/arm64
50+
tags: ${{ steps.meta.outputs.tags }}
51+
file: Dockerfile
52+
labels: ${{ steps.meta.outputs.labels }}
53+
cache-from: type=gha
54+
cache-to: type=gha,mode=max
55+
-
56+
name: Configure Git
57+
run: |
58+
git config user.name "$GITHUB_ACTOR"
59+
git config user.email "[email protected]"
60+
-
61+
name: Install Helm
62+
uses: azure/setup-helm@v3
63+
with:
64+
version: v3.10.0
65+
-
66+
name: Run chart-releaser
67+
if: github.ref == 'refs/heads/main'
68+
uses: helm/[email protected]
69+
env:
70+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)