Skip to content

Docker Image CI/CD for timescale + postgis image #1

Docker Image CI/CD for timescale + postgis image

Docker Image CI/CD for timescale + postgis image #1

Workflow file for this run

name: Docker Image CI/CD for timescale + postgis image
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
strategy:
matrix:
dockerfile: ['Dockerfile.pg13-ts2.12', 'Dockerfile.pg14-ts2.12','Dockerfile.pg15-ts2.12']
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from Dockerfile name
id: extract_version
run: |
version="${{ matrix.dockerfile }}"
version="${version#Dockerfile.}" # Remove "Dockerfile." prefix if it exists
echo "::set-output name=version::${version}"
shell: bash
- name: Build and Publish
uses: docker/build-push-action@v4
with:
file: ${{ matrix.dockerfile }}
platforms: linux/amd64
push: true
tags: ghcr.io/${{ github.repository }}:${{ steps.extract_version.outputs.version }}