Skip to content

sync repo and update packages (#18) #9

sync repo and update packages (#18)

sync repo and update packages (#18) #9

Workflow file for this run

name: Build and Deploy Docker Image
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Commit Hash
id: commit_hash
uses: prompt/actions-commit-hash@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
${{ secrets.REGISTRY }}/${{ vars.CONTAINER_REGISTRY_ORG }}/typesense-dashboard
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=raw,value=${{ steps.commit_hash.outputs.short }}
type=raw,value=latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}