switch back to ubuntu-22.04 and clean runner's disk #248
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Docker Image | |
on: | |
push: | |
branches: [ release_docker, dev-build ] | |
pull_request: | |
paths: .github/workflows/docker-image.yml | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to release' | |
required: true | |
# This is a manual workaround until the latest tagging is fixed: | |
# https://github.com/timescale/timescaledb-docker/issues/205 | |
no_tag_latest: | |
description: 'Do not tag the published images as latest' | |
type: boolean | |
required: false | |
default: false | |
env: | |
ORG: timescale #timescaledev | |
TS_VERSION: ${{ github.event.inputs.version || '2.18.1' }} | |
jobs: | |
# Build multi-arch TimescaleDB images for both TSL and OSS code. | |
timescaledb: | |
name: PG${{ matrix.pg }}${{ matrix.oss }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
pg: [14, 15, 16, 17] | |
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@v4 | |
- 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.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin | |
- name: Build and push multi-platform Docker image for TimescaleDB | |
run: | | |
if [ "${{ github.event_name }}" == "pull_request" ] | |
then | |
export ORG=timescaledev | |
fi | |
if [ "${{ github.event.inputs.no_tag_latest }}" == "true" ] | |
then | |
export BETA=1 | |
fi | |
make multi${{ matrix.oss }} ORG=$ORG PG_VER=pg${{ matrix.pg }} \ | |
TS_VERSION=$TS_VERSION PREV_EXTRA="${{ matrix.oss }}" BETA=$BETA | |