-
Notifications
You must be signed in to change notification settings - Fork 28
90 lines (79 loc) · 2.81 KB
/
docker-image.yml
File metadata and controls
90 lines (79 loc) · 2.81 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
name: Tagged Release Docker Image
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
ORG:
description: 'the organization for tagging Docker images'
required: true
default: "samagragovernance"
tag_latest:
description: 'Tag the published images as latest'
type: boolean
required: false
default: false
ts_version:
description: 'TS version to be used'
required: false
default: ""
env:
ORG: ${{inputs.ORG}}
TS_VERSION: ${{inputs.ts_version}}
PRE_RELEASE: "true" # prevents the latest tag from being pushed.
jobs:
# Build multi-arch TimescaleDB images for both TSL and OSS code.
postgres:
name: PG${{ matrix.pg }}${{ matrix.oss }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pg: [14, 15, 16]
oss: [ "", "-oss" ]
steps:
- uses: actions/checkout@v3
with:
ref: ${{inputs.version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin
- name: Build and push multi-platform Docker image for postgres
run: |
if [ "${{inputs.tag_latest}}" == "true" ]; then
export PRE_RELEASE=''
fi
make multi${{ matrix.oss }} ORG="$ORG" PG_VER="pg${{ matrix.pg }}" \
${TS_VERSION:+TS_VERSION="$TS_VERSION"} PREV_EXTRA="${{ matrix.oss }}" PRE_RELEASE="$PRE_RELEASE"
# Build bitnami images of TimscaleDB.
# The images are built only for amd64, since it is the only supported architecture in the base image bitname/postgresql.
# The images are only built for TSL code.
timescaledb-bitnami:
name: PG${{ matrix.pg }}-bitnami
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pg: [13, 14, 15]
steps:
- uses: actions/checkout@v3
with:
ref: ${{inputs.version}}
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin
- name: Build and push amd64 Docker image for TimescaleDB bitnami
run: |
if [ "${{inputs.tag_latest}}" == "true" ]; then
export PRE_RELEASE=''
fi
make push ORG="$ORG" PG_VER="pg${{ matrix.pg }}" ${TS_VERSION:+TS_VERSION="$TS_VERSION"} PRE_RELEASE="$PRE_RELEASE"
working-directory: bitnami