Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Commit 4ee098b

Browse files
committed
feat(workflows): copy build workflows to base repo
This allows us to build all the container images in one repo.
1 parent af303b3 commit 4ee098b

4 files changed

Lines changed: 182 additions & 0 deletions

File tree

.github/workflows/build-deviceregistry.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
# Publish semver tags as releases.
88
tags:
99
- 'v*.*.*'
10+
paths_ignore:
11+
- 'mittaridatapumppu-*/**'
1012

1113
env:
1214
REGISTRY: ghcr.io
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build and push endpoint image
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
# Publish semver tags as releases.
8+
tags:
9+
- 'v*.*.*'
10+
paths:
11+
- 'mittaridatapumppu-endpoint/**'
12+
13+
env:
14+
REGISTRY: ghcr.io
15+
IMAGE_NAME: ${{ github.repository }}-endpoint
16+
17+
jobs:
18+
build-and-push:
19+
20+
runs-on: ubuntu-latest
21+
22+
permissions:
23+
contents: read
24+
packages: write
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v3
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
# Login against a Docker registry
35+
# https://github.com/docker/login-action
36+
- name: Log into registry ${{ env.REGISTRY }}
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ${{ env.REGISTRY }}
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
# Extract metadata (tags, labels) for Docker
44+
# https://github.com/docker/metadata-action
45+
- name: Extract Docker metadata
46+
id: meta
47+
uses: docker/metadata-action@v5
48+
with:
49+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
50+
51+
# Build and push Docker image
52+
# https://github.com/docker/build-push-action
53+
- name: Build and push Docker image
54+
uses: docker/build-push-action@v5
55+
with:
56+
context: mittaridatapumppu-endpoint
57+
platforms: linux/amd64,linux/arm64
58+
push: true
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/build-parser.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build and push parser image
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
# Publish semver tags as releases.
8+
tags:
9+
- 'v*.*.*'
10+
paths:
11+
- 'mittaridatapumppu-parser/**'
12+
13+
env:
14+
REGISTRY: ghcr.io
15+
IMAGE_NAME: ${{ github.repository }}-parser
16+
17+
jobs:
18+
build-and-push:
19+
20+
runs-on: ubuntu-latest
21+
22+
permissions:
23+
contents: read
24+
packages: write
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v3
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
# Login against a Docker registry
35+
# https://github.com/docker/login-action
36+
- name: Log into registry ${{ env.REGISTRY }}
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ${{ env.REGISTRY }}
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
# Extract metadata (tags, labels) for Docker
44+
# https://github.com/docker/metadata-action
45+
- name: Extract Docker metadata
46+
id: meta
47+
uses: docker/metadata-action@v5
48+
with:
49+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
50+
51+
# Build and push Docker image
52+
# https://github.com/docker/build-push-action
53+
- name: Build and push Docker image
54+
uses: docker/build-push-action@v5
55+
with:
56+
context: mittaridatapumppu-parser
57+
platforms: linux/amd64,linux/arm64
58+
push: true
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build and push persister image
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
# Publish semver tags as releases.
8+
tags:
9+
- 'v*.*.*'
10+
paths:
11+
- 'mittaridatapumppu-persister/**'
12+
13+
env:
14+
REGISTRY: ghcr.io
15+
IMAGE_NAME: ${{ github.repository }}-persister
16+
17+
jobs:
18+
build-and-push:
19+
20+
runs-on: ubuntu-latest
21+
22+
permissions:
23+
contents: read
24+
packages: write
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v3
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
# Login against a Docker registry
35+
# https://github.com/docker/login-action
36+
- name: Log into registry ${{ env.REGISTRY }}
37+
uses: docker/login-action@v3
38+
with:
39+
registry: ${{ env.REGISTRY }}
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
# Extract metadata (tags, labels) for Docker
44+
# https://github.com/docker/metadata-action
45+
- name: Extract Docker metadata
46+
id: meta
47+
uses: docker/metadata-action@v5
48+
with:
49+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
50+
51+
# Build and push Docker image
52+
# https://github.com/docker/build-push-action
53+
- name: Build and push Docker image
54+
uses: docker/build-push-action@v5
55+
with:
56+
context: mittaridatapumppu-persister
57+
platforms: linux/amd64,linux/arm64
58+
push: true
59+
tags: ${{ steps.meta.outputs.tags }}
60+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)