Skip to content

Build and Push Docker Images (Separate Arch) #2

Build and Push Docker Images (Separate Arch)

Build and Push Docker Images (Separate Arch) #2

Workflow file for this run

name: Build and Push Docker Image
on:
push:
tags:
- '*' # Run on any new tag
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
id: checkout
- name: Set short SHA
id: vars
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
luismachadoreis/postgres-multidb-pgvector:${{ steps.vars.outputs.short_sha }}
luismachadoreis/postgres-multidb-pgvector:pg17
luismachadoreis/postgres-multidb-pgvector:latest