Skip to content

update version

update version #92

Workflow file for this run

name: docker
on:
push:
branches:
- "postgres-17"
paths:
- "Dockerfile"
- ".github/workflows/docker.yaml"
env:
REGISTRY: ghcr.io
IMAGE_NAME: arrowtail-precision/postgres-timescale
# Docker BuildX caching borrowed from this tutorial;
# https://evilmartians.com/chronicles/build-images-on-github-actions-with-docker-layer-caching
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
# This is the a separate action that sets up buildx runner
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# So now you can use Actions' own caching!
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log in to ghcr
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Add tags and labels to Docker image
# see docs here; https://github.com/docker/metadata-action
# OLD tags
# type=sha,prefix=,suffix=,format=short
# type=raw,value={{date 'YYYY.MM.DD'}}-${{ github.run_number % 10 }}
- name: Docker Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value={{date 'YYYY.MDD'}}.${{ github.run_number }}-postgres-17
# And make it available for the builds
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
build-args: |
IMAGE=crunchy-postgres-gis
POSTGRES_MAJOR_VERSION=17
POSTGRES_MINOR_VERSION=2
POSTGIS_VERSION=3.4
CRUNCHY_IMAGE_VERSION=0
TIMESCALE_VERSION=2.17.2
TIMESCALE_TOOLKIT_VERSION=1.19.0
POSTGRESQL_UNIT_VERSION=7.9-1PGDG
# CHECK THESE VALUES IN THE DOCKERFILE TOO!
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new
# This ugly bit is necessary if you don't want your cache to grow forever
# till it hits GitHub's limit of 5GB.
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
# - name: Move cache
# run: |
# rm -rf /tmp/.buildx-cache
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache