Skip to content

Commit 62292a2

Browse files
committed
sketch ci
1 parent dc7ec73 commit 62292a2

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#
2+
# A GitHub workflow to build containers for each semantically versioned tag (i.e. vX.Y.Z).
3+
#
4+
# help:
5+
# - tagging info: https://github.com/docker/build-push-action/blob/v2/docs/advanced/tags-labels.md
6+
# - original gist: https://gist.github.com/robb-j/049217ca8cecf4e214b8b82123f7371b
7+
#
8+
9+
name: 'Build API Server'
10+
11+
on:
12+
push:
13+
tags: [api-server/v*.*.*]
14+
15+
jobs:
16+
build_server:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v5
21+
22+
- name: Generate metadata
23+
id: meta
24+
uses: docker/metadata-action@v5
25+
with:
26+
images: |
27+
containers.r0b.io/deconf/api-server
28+
tags: |
29+
type=semver,pattern={{version}},match=v(\d.\d.\d)$
30+
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Login to registry
38+
uses: docker/login-action@v3
39+
with:
40+
registry: ${{ secrets.REGISTRY_URL }}
41+
username: ${{ secrets.REGISTRY_USERNAME }}
42+
password: ${{ secrets.REGISTRY_PASSWORD }}
43+
44+
- name: Build and push
45+
uses: docker/build-push-action@v3
46+
with:
47+
context: api-server
48+
push: true
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)