Skip to content

Commit 7e7f904

Browse files
authored
[tests] Publish a test-services docker image (#486)
1 parent 7acf752 commit 7e7f904

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/docker.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build docker image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags:
7+
- v**
8+
9+
env:
10+
REPOSITORY_OWNER: ${{ github.repository_owner }}
11+
GHCR_REGISTRY: "ghcr.io"
12+
GHCR_REGISTRY_USERNAME: ${{ github.actor }}
13+
GHCR_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
15+
jobs:
16+
build-node-services-docker-image:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up QEMU dependency
23+
uses: docker/setup-qemu-action@v2
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v2
27+
28+
- name: Log into GitHub container registry
29+
uses: docker/login-action@v2
30+
with:
31+
registry: ${{ env.GHCR_REGISTRY }}
32+
username: ${{ env.GHCR_REGISTRY_USERNAME }}
33+
password: ${{ env.GHCR_REGISTRY_TOKEN }}
34+
35+
- name: Extract metadata (tags, labels)
36+
id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: |
40+
ghcr.io/restatedev/test-services-node
41+
tags: |
42+
type=ref,event=branch
43+
type=semver,pattern={{version}}
44+
type=semver,pattern={{major}}.{{minor}
45+
46+
- name: Build docker image
47+
uses: docker/build-push-action@v3
48+
with:
49+
context: .
50+
file: packages/restate-e2e-services/Dockerfile
51+
push: true
52+
platforms: linux/arm64,linux/amd64
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)