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:
|
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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user