Skip to content

Merge pull request #13 from PauloHMattos/main #20

Merge pull request #13 from PauloHMattos/main

Merge pull request #13 from PauloHMattos/main #20

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
workflow_call:
secrets:
DOCKER_USERNAME:
required: true
DOCKER_TOKEN:
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get latest release tag for Babelfish
id: get_babelfish_latest
run: |
BABELFISH_TAG=$(curl -s https://api.github.com/repos/babelfish-for-postgresql/babelfish-for-postgresql/releases/latest | jq -r '.tag_name')
echo "babelfish_tag=$BABELFISH_TAG" >> $GITHUB_OUTPUT
echo "Latest Babelfish release: $BABELFISH_TAG"
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
tags: |
jonathanpotts/babelfishpg:${{ steps.get_babelfish_latest.outputs.babelfish_tag }}
jonathanpotts/babelfishpg:latest
build-args:
BABELFISH_VERSION=${{ steps.get_babelfish_latest.outputs.babelfish_tag }}
push: true