Skip to content

Commit f9c40d7

Browse files
committed
feat: add main github action
1 parent 9201a91 commit f9c40d7

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/main.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build (main)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
env:
10+
REGISTRY: ghcr.io/openmcp-project
11+
IMAGE_NAME: mcp-ui-frontend
12+
13+
jobs:
14+
run-build:
15+
uses: ./.github/workflows/build.yaml
16+
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
needs: [run-build]
21+
permissions:
22+
contents: write
23+
packages: write
24+
id-token: write
25+
attestations: write
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
31+
- name: Docker meta
32+
id: meta
33+
uses: docker/metadata-action@v5
34+
with:
35+
images: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}
36+
tags: |
37+
type=sha,prefix={{branch}}-
38+
39+
- name: Log in to the Container registry
40+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
41+
with:
42+
registry: ${{ env.REGISTRY }}
43+
username: ${{ github.actor }}
44+
password: ${{ secrets.GITHUB_TOKEN }}
45+
46+
- name: Set up QEMU
47+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #v3.6.0
48+
49+
- name: Set up Docker Buildx
50+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 #v3.10.0
51+
52+
- name: Build and push
53+
uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 #v6.16.0
54+
with:
55+
context: .
56+
platforms: linux/amd64,linux/arm64
57+
push: true
58+
sbom: true
59+
provenance: mode=max
60+
tags: ${{ steps.meta.outputs.tags }}
61+
labels: ${{ steps.meta.outputs.labels }}
62+
annotations: ${{ steps.meta.outputs.annotations }}
63+
cache-from: type=gha
64+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)