-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (82 loc) · 3.18 KB
/
Copy pathplugin-postgres-build.yml
File metadata and controls
92 lines (82 loc) · 3.18 KB
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
82
83
84
85
86
87
88
89
90
91
92
name: Postgres Docker Hub Image Build
on:
workflow_call:
inputs:
folder:
required: true
type: string
name:
required: true
type: string
version:
required: true
type: string
workflow_dispatch:
inputs:
folder:
required: true
type: string
name:
required: true
type: string
version:
required: true
type: string
jobs:
build:
name: Build ${{ matrix.image }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: Dockerfile.base
image: polypheny/postgres
readme: README.base.md
- dockerfile: Dockerfile.pgvector
image: polypheny/postgres-pgvector
readme: README.pgvector.md
- dockerfile: Dockerfile.postgis
image: polypheny/postgres-postgis
readme: README.postgis.md
- dockerfile: Dockerfile.full
image: polypheny/postgres-pgvector-postgis
readme: README.full.md
steps:
# SETUP BUILD ENVIRONMENT
- id: checkout-code
name: Checkout code
uses: actions/checkout@v3
with:
ref: main
# EXTRACT RELEASE NOTES
- id: extract-release-notes
name: Extract release notes and version
uses: mindsers/changelog-reader-action@v2
with:
validation_level: warn
path: ./${{ inputs.folder }}/${{ inputs.name }}/CHANGELOG.md
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: polypheny
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: ${{ steps.extract-release-notes.outputs.version }} Build & Push ${{ matrix.image }}
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:${{ inputs.folder }}/${{ inputs.name }}"
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ matrix.image }}:${{ inputs.version }}
- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: polypheny
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
repository: ${{ matrix.image }}
readme-filepath: ./${{ inputs.folder }}/${{ inputs.name }}/${{ matrix.readme }}