|
| 1 | +name: Release Docker Image |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: [ release_docker, dev-build ] |
| 5 | + workflow_dispatch: |
| 6 | + inputs: |
| 7 | + version: |
| 8 | + description: 'Version to release' |
| 9 | + required: true |
| 10 | + # This is a manual workaround until the latest tagging is fixed: |
| 11 | + # https://github.com/timescale/timescaledb-docker/issues/205 |
| 12 | + no_tag_latest: |
| 13 | + description: 'Do not tag the published images as latest' |
| 14 | + type: boolean |
| 15 | + required: false |
| 16 | + default: false |
| 17 | +env: |
| 18 | + ORG: timescale #timescaledev |
| 19 | + TS_VERSION: ${{ github.event.inputs.version || '2.10.0' }} |
| 20 | +jobs: |
| 21 | + |
| 22 | + # Build multi-arch TimescaleDB images for both TSL and OSS code. |
| 23 | + timescaledb: |
| 24 | + |
| 25 | + name: PG${{ matrix.pg }}${{ matrix.oss }} |
| 26 | + runs-on: ubuntu-latest |
| 27 | + strategy: |
| 28 | + fail-fast: false |
| 29 | + matrix: |
| 30 | + pg: [12, 13, 14, 15] |
| 31 | + oss: [ "", "-oss" ] |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v3 |
| 34 | + |
| 35 | + - name: Set up QEMU |
| 36 | + uses: docker/setup-qemu-action@v1 |
| 37 | + with: |
| 38 | + platforms: all |
| 39 | + |
| 40 | + - name: Set up Docker Buildx |
| 41 | + id: buildx |
| 42 | + uses: docker/setup-buildx-action@v1 |
| 43 | + |
| 44 | + - name: Available platforms |
| 45 | + run: echo ${{ steps.buildx.outputs.platforms }} |
| 46 | + |
| 47 | + - name: Login to DockerHub Registry |
| 48 | + run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin |
| 49 | + |
| 50 | + - name: Build and push multi-platform Docker image for TimescaleDB |
| 51 | + run: | |
| 52 | + if [ "${{ github.event.inputs.no_tag_latest }}" == "true" ] |
| 53 | + then |
| 54 | + export BETA=1 |
| 55 | + fi |
| 56 | + make multi${{ matrix.oss }} ORG=$ORG PG_VER=pg${{ matrix.pg }} \ |
| 57 | + TS_VERSION=$TS_VERSION PREV_EXTRA="${{ matrix.oss }}" BETA=$BETA |
| 58 | +
|
| 59 | + # Build bitnami images of TimscaleDB. |
| 60 | + # The images are built only for amd64, since it is the only supported architecture in the base image bitname/postgresql. |
| 61 | + # The images are only built for TSL code. |
| 62 | + timescaledb-bitnami: |
| 63 | + |
| 64 | + name: PG${{ matrix.pg }}-bitnami |
| 65 | + runs-on: ubuntu-latest |
| 66 | + strategy: |
| 67 | + fail-fast: false |
| 68 | + matrix: |
| 69 | + pg: [12, 13, 14, 15] |
| 70 | + |
| 71 | + steps: |
| 72 | + - uses: actions/checkout@v3 |
| 73 | + |
| 74 | + - name: Login to DockerHub Registry |
| 75 | + run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin |
| 76 | + |
| 77 | + - name: Build and push amd64 Docker image for TimescaleDB bitnami |
| 78 | + run: | |
| 79 | + if [ "${{ github.event.inputs.no_tag_latest }}" == "true" ] |
| 80 | + then |
| 81 | + export BETA=1 |
| 82 | + fi |
| 83 | + make push ORG=$ORG PG_VER=pg${{ matrix.pg }} TS_VERSION=$TS_VERSION BETA=$BETA |
| 84 | + working-directory: bitnami |
0 commit comments