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