mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-28 18:46:09 +00:00
add per-commit image tag
This commit is contained in:
parent
239db34c67
commit
d2e5b6f1fb
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
|
@ -33,6 +33,9 @@ jobs:
|
|||
- name: Get version from package.json
|
||||
id: package-version
|
||||
uses: martinbeentjes/npm-get-version-action@v1.3.1
|
||||
- name: Get short commit hash
|
||||
id: commit-hash
|
||||
run: echo "commit_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
|
@ -40,6 +43,7 @@ jobs:
|
|||
tags: |
|
||||
type=raw,value=latest
|
||||
type=raw,value=${{ steps.package-version.outputs.current-version }}
|
||||
type=raw,value=${{ steps.package-version.outputs.current-version }}-${{ steps.commit-hash.outputs.commit_short }}
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
|
|
Loading…
Reference in a new issue