mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 18:17:39 +08:00
Setup COMMIT_SHA and COMMIT_DATE build args in the Docker image
This commit is contained in:
parent
af6f7f8462
commit
50d9fe036e
11
.github/workflows/publish-docker-images.yml
vendored
11
.github/workflows/publish-docker-images.yml
vendored
@ -39,6 +39,14 @@ jobs:
|
|||||||
if: github.event_name != 'schedule' && steps.check-tag-format.outputs.stable == 'true'
|
if: github.event_name != 'schedule' && steps.check-tag-format.outputs.stable == 'true'
|
||||||
run: bash .github/scripts/check-release.sh
|
run: bash .github/scripts/check-release.sh
|
||||||
|
|
||||||
|
- name: Set build-args for Docker buildx
|
||||||
|
id: build-metadata
|
||||||
|
run: |
|
||||||
|
# Extract commit date
|
||||||
|
commit_date=$(git show -s --format=%cd --date=iso-strict ${{ github.sha }})
|
||||||
|
|
||||||
|
echo "date=$commit_date" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
@ -72,6 +80,9 @@ jobs:
|
|||||||
push: ${{ github.event_name != 'schedule' }}
|
push: ${{ github.event_name != 'schedule' }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
build-args: |
|
||||||
|
COMMIT_SHA=${{ github.sha }}
|
||||||
|
COMMIT_DATE=${{ steps.build-metadata.outputs.date }}
|
||||||
|
|
||||||
# /!\ Don't touch this without checking with Cloud team
|
# /!\ Don't touch this without checking with Cloud team
|
||||||
- name: Send CI information to Cloud team
|
- name: Send CI information to Cloud team
|
||||||
|
Loading…
Reference in New Issue
Block a user