Skip to content

Test outputs

Test outputs #262

Workflow file for this run

name: Publish images
on:
workflow_dispatch:
push:
branches:
- master
- main
- brent/tag_fix
paths-ignore:
- "*.md"
schedule:
- cron: '0 7 * * 2'
concurrency:
group: publish-ha-images-${{ github.ref }}
cancel-in-progress: true
env:
DOCKER_REPOSITORY: timescaledev/timescaledb-ha
DOCKER_REGISTRY: docker.io
jobs:
publish:
name: Publish pg${{ matrix.pg_major }}${{ matrix.all }}${{ matrix.oss }} ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ "amd64", "arm64" ]
pg_major: [ "16" ]
all_versions: [ "false" ]
oss_only: [ "false" ]
include:
- platform: amd64
runs_on: ubuntu-22.04
- platform: arm64
runs_on: cloud-image-runner-arm64
runs-on: "${{ matrix.runs_on }}"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.ORG_DOCKER_HUB_USERNAME }}
password: ${{ secrets.ORG_DOCKER_HUB_ACCESS_TOKEN }}
- name: Setup | Docker Context
run: if ! docker context use ha-builder; then docker context create ha-builder; fi
- name: Setup | Buildx
uses: docker/setup-buildx-action@v3
with:
endpoint: ha-builder
- name: Build and publish (pg${{ matrix.pg_major }}${{ matrix.all }}${{ matrix.oss }} ${{ matrix.platform }})
id: build
env:
PLATFORM: ${{ matrix.platform }}
PG_MAJOR: ${{ matrix.pg_major }}
#ALL_VERSIONS: ${{ matrix.all_versions }}
#OSS_ONLY: ${{ matrix.oss_only }}
run: |
GIT_REV="${GITHUB_REF#refs/tags/}" make publish-builder publish-release
- name: export outputs
run: |
mkdir -p /tmp/outputs
builder_id="${{ steps.build.outputs.builder_id }}"
release_id="${{ steps.build.outputs.release_id }}"
touch "/tmp/outputs/builder-${builder_id#sha256:}"
touch "/tmp/outputs/release-${release_id#sha256:}"
- name: upload outputs
uses: actions/upload-artifact@v4
with:
name: outputs-${{ matrix.platform }}
path: /tmp/outputs/*
if-no-files-found: error
retention-days: 1
publish-combined-manifests:
name: Publish manifest pg${{ matrix.pg_major }}${{ matrix.docker_tag_postfix }}
needs: [ "publish" ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pg_major: [ "16" ]
docker_tag_postfix: [""]
steps:
- name: Download outputs
uses: actions/download-artifact@v4
with:
path: /tmp/outputs
pattern: '*'
merge-multiple: true
- name: Checkout code
uses: actions/checkout@v4
# QEMU for multiplatform, which should be quick enough for pulling version information out of the images
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.ORG_DOCKER_HUB_USERNAME }}
password: ${{ secrets.ORG_DOCKER_HUB_ACCESS_TOKEN }}
- name: Publish combined manifest for pg${{ matrix.pg_major }}${{ matrix.docker_tag_postfix }}
env:
PG_MAJOR: ${{ matrix.pg_major }}
VERSION_TAG: pg${{ matrix.pg_major}}${{ matrix.docker_tag_postfix }}-builder
DOCKER_TAG_POSTFIX: ${{ matrix.docker_tag_postfix }}
run: make publish-manifests
check:
name: Check image pg${{ matrix.pg_major }}${{ matrix.docker_tag_postfix }}
needs: [ "publish-combined-manifests" ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pg_major: [ "16" ]
docker_tag_postfix: [""]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.ORG_DOCKER_HUB_USERNAME }}
password: ${{ secrets.ORG_DOCKER_HUB_ACCESS_TOKEN }}
# QEMU for multiplatform, which should be quick enough for just the checks
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Check pg${{ matrix.pg_major }}${{ matrix.docker_tag_postfix }}
env:
PG_MAJOR: ${{ matrix.pg_major }}
DOCKER_TAG_POSTFIX: ${{ matrix.docker_tag_postfix }}
run: make get-image-config check