Skip to content

chore(deps): update actions/checkout action to v7 #435

chore(deps): update actions/checkout action to v7

chore(deps): update actions/checkout action to v7 #435

Workflow file for this run

name: Build
on: push
env:
# renovate datasource=github-releases depName=timescale/timescaledb
TIMESCALE_VERSION: 2.19.3
jobs:
build:
name: Build Image (pg${{ matrix.postgres_version }})
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- postgres_version: "17"
# renovate datasource=docker depName=ghcr.io/cloudnative-pg/postgresql
cnpg_version: 17.5-22
latest: "true"
- postgres_version: "16"
# renovate datasource=docker depName=ghcr.io/cloudnative-pg/postgresql
cnpg_version: 16.9-22
- postgres_version: "15"
# renovate datasource=docker depName=ghcr.io/cloudnative-pg/postgresql
cnpg_version: 15.13-22
- postgres_version: "14"
# renovate datasource=docker depName=ghcr.io/cloudnative-pg/postgresql
cnpg_version: 14.18-22
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Get CloudNativePG version
id: cnpg
env:
VERSION: ${{ matrix.cnpg_version }}
run: |
{
echo "version=$VERSION"
echo "minor=$(cut -d- -f1 <<<"$VERSION")"
echo "major=$(cut -d. -f1 <<<"$VERSION")"
} >> $GITHUB_OUTPUT
- name: Get Timescale version
id: timescale
run: |
{
echo "version=$TIMESCALE_VERSION"
echo "minor=$(cut -d. -f-2 <<<"$TIMESCALE_VERSION")"
echo "major=$(cut -d. -f1 <<<"$TIMESCALE_VERSION")"
} >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
with:
images: |
ghcr.io/${{ github.repository_owner }}/cloudnativepg-timescale
flavor: latest=false
tags: |
type=raw,priority=1000,value=latest,enable=${{ matrix.latest || 'false' }}
type=raw,priority=999,value=${{ steps.cnpg.outputs.version }}-ts${{ steps.timescale.outputs.version }}
type=raw,priority=998,value=${{ steps.cnpg.outputs.minor }}-ts${{ steps.timescale.outputs.minor }}
type=raw,priority=997,value=${{ steps.cnpg.outputs.major }}-ts${{ steps.timescale.outputs.major }}
type=raw,priority=996,value=${{ steps.cnpg.outputs.version }}
type=raw,priority=995,value=${{ steps.cnpg.outputs.minor }}
type=raw,priority=994,value=${{ steps.cnpg.outputs.major }}
- name: Set up QEMU
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
- name: Set up Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Login to GitHub Container Registry
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and Push
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
context: .
pull: true
push: ${{ github.ref_name == 'main' }}
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
POSTGRES_VERSION=${{ matrix.postgres_version }}
CLOUDNATIVEPG_VERSION=${{ steps.cnpg.outputs.version }}
TIMESCALE_VERSION=${{ steps.timescale.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7
build-success:
name: Build Successful
runs-on: ubuntu-latest
needs: build
if: ${{ always() }}
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
name: Check matrix status
run: exit 1