Update docker-build-push.yml

This commit is contained in:
Iyas Altawil
2025-06-28 13:29:05 +03:30
committed by GitHub
parent 781a174528
commit 056debac7c

View File

@@ -9,6 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }}
IMAGE_TAG: ${{ github.sha }}
jobs: jobs:
build-and-push: build-and-push:
@@ -21,10 +22,6 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Extract short commit SHA
id: sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
@@ -38,4 +35,4 @@ jobs:
context: . context: .
file: container/Dockerfile file: container/Dockerfile
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/saya-search:${{ steps.sha.outputs.short_sha }} tags: ${{ env.REGISTRY }}/saya-search:${{ env.IMAGE_TAG }}