mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-24 20:18:48 +01:00
add per-commit image tag
This commit is contained in:
parent
239db34c67
commit
d2e5b6f1fb
1 changed files with 4 additions and 0 deletions
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
|
@ -33,6 +33,9 @@ jobs:
|
||||||
- name: Get version from package.json
|
- name: Get version from package.json
|
||||||
id: package-version
|
id: package-version
|
||||||
uses: martinbeentjes/npm-get-version-action@v1.3.1
|
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
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
|
@ -40,6 +43,7 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest
|
type=raw,value=latest
|
||||||
type=raw,value=${{ steps.package-version.outputs.current-version }}
|
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 }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
|
|
Loading…
Reference in a new issue