Skip to content

use organisation tokens for dockerhub #326

use organisation tokens for dockerhub

use organisation tokens for dockerhub #326

Workflow file for this run

name: Release Docker Image
on:
push:
branches: [ release_docker, dev-build ]
pull_request:
workflow_call:
inputs:
version:
description: 'Version to release'
type: string
required: true
registry:
description: 'Registry to use to push images'
type: string
required: false
default: 'dev'
tag_latest:
description: 'Tag the published images as latest'
type: boolean
required: false
default: false
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: true
registry:
description: 'Registry to use to push images'
type: choice
required: false
default: 'dev'
options:
- prod
- dev
tag_latest:
description: 'Tag the published images as latest'
type: boolean
required: false
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
ORG: timescaledev #timescaledev
TS_VERSION: ${{ github.event.inputs.version || '2.24.0' }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
# Build multi-arch TimescaleDB images for both TSL and OSS code.
timescaledb:
name: PG${{ matrix.pg }}${{ matrix.oss }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
pg: [15, 16, 17, 18]
oss: [ "", "-oss" ]
steps:
# The github runners have a lot of space in /mnt, but apparently not enough in /. This step removes about 13G.
- name: remove unneeded runner software
run: |
df -h
du -chs /usr/share/dotnet /usr/local/lib/android /opt/microsoft || true
sudo rm -fr /usr/share/dotnet /usr/local/lib/android /opt/microsoft || true
sudo docker image prune --all --force || true
df -h
- uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login to DockerHub Registry
run: echo ${{ secrets.ORG_DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.ORG_DOCKER_HUB_USERNAME }} --password-stdin
- name: Build and push multi-platform Docker image for TimescaleDB
run: |
export BETA=1
if [ "${{ github.event.inputs.tag_latest }}" == "true" ]
then
export BETA=
fi
if [ "${{ github.event.inputs.registry }}" == "prod" ]
then
export ORG=timescale
fi
make multi${{ matrix.oss }} ORG=$ORG PG_VER=pg${{ matrix.pg }} \
TS_VERSION=$TS_VERSION PREV_EXTRA="${{ matrix.oss }}" BETA=$BETA