mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
ci: 👷 Add the short commit SHA as a docker container tag
This commit is contained in:
parent
0ae9cfe26c
commit
84a0a07ea6
2 changed files with 12 additions and 0 deletions
6
.github/workflows/docker-server.yml
vendored
6
.github/workflows/docker-server.yml
vendored
|
|
@ -51,6 +51,12 @@ jobs:
|
|||
uses: docker/metadata-action@v5 # v5.0.0
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
type=ref,event=pr
|
||||
type=sha
|
||||
|
||||
- name: Get the commit hash
|
||||
run: echo "GIT_COMMIT=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
||||
|
|
|
|||
6
.github/workflows/docker-worker.yml
vendored
6
.github/workflows/docker-worker.yml
vendored
|
|
@ -51,6 +51,12 @@ jobs:
|
|||
uses: docker/metadata-action@v5 # v5.0.0
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
type=ref,event=pr
|
||||
type=sha
|
||||
|
||||
- name: Get the commit hash
|
||||
run: echo "GIT_COMMIT=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue