add sha_short as tag of the images
This commit is contained in:
@ -22,8 +22,11 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # required to see all branches
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: get commit hash
|
||||||
|
id: get_hash
|
||||||
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
@ -40,7 +43,7 @@ runs:
|
|||||||
with:
|
with:
|
||||||
context: "{{defaultContext}}:${{ input.path }}"
|
context: "{{defaultContext}}:${{ input.path }}"
|
||||||
push: true
|
push: true
|
||||||
tags: git.tmoron.fr/${{ inputs.name }}:latest
|
tags: git.tmoron.fr/${{ inputs.name }}:${{ steps.get_hash.outputs.sha_short }}
|
||||||
|
|
||||||
- name: push to latest branch
|
- name: push to latest branch
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user