-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (68 loc) · 1.93 KB
/
postgres.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Postgres
on:
push:
branches:
- "main"
- ci/release-postgres
tags:
- 'v*'
- "docker/Dockerfile.postgres"
jobs:
build-images:
continue-on-error: true
strategy:
matrix:
include:
- release_for: Linux-x86_64
build_on: ubuntu-latest
suffix: amd
image: ghcr.io/txpipe/mumak
- release_for: Linux-arm64
build_on: buildjet-2vcpu-ubuntu-2204-arm
suffix: arm
image: ghcr.io/txpipe/mumak
runs-on: ${{ matrix.build_on }}
steps:
- uses: actions/[email protected]
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile.postgres
push: true
tags: ${{ matrix.image }}:${{ github.sha }}-${{ matrix.suffix }}
build-manifest:
needs:
- build-images
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: ghcr.io/txpipe/mumak
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: metadata
with:
images: ${{ matrix.image }}
- uses: int128/docker-manifest-create-action@v2
id: build
with:
index-annotations: ${{ steps.metadata.outputs.labels }}
tags: |
${{ matrix.image }}:${{ github.sha }}
${{ matrix.image }}
sources: |
${{ matrix.image }}:${{ github.sha }}-amd
${{ matrix.image }}:${{ github.sha }}-arm