Update docker-build-push.yml
This commit is contained in:
7
.github/workflows/docker-build-push.yml
vendored
7
.github/workflows/docker-build-push.yml
vendored
@@ -9,6 +9,7 @@ on:
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@@ -21,10 +22,6 @@ jobs:
|
||||
- name: Checkout repository
|
||||
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
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
@@ -38,4 +35,4 @@ jobs:
|
||||
context: .
|
||||
file: container/Dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ env.REGISTRY }}/saya-search:${{ steps.sha.outputs.short_sha }}
|
||||
tags: ${{ env.REGISTRY }}/saya-search:${{ env.IMAGE_TAG }}
|
||||
|
||||
Reference in New Issue
Block a user