Generation de tag
parent
b3db00f950
commit
685834c5de
|
|
@ -41,26 +41,6 @@ jobs:
|
|||
echo "All env variables:"
|
||||
env | grep -i gitea
|
||||
|
||||
- name: Generate Docker tags from Gitea context
|
||||
id: docker_tags
|
||||
run: |
|
||||
# Récupérer le SHA court du commit
|
||||
SHORT_SHA=$(git rev-parse --short HEAD)
|
||||
|
||||
# Pour les tags Git (si l'événement est un tag)
|
||||
if [[ "${GITEA_REF}" == refs/tags/* ]]; then
|
||||
TAG_NAME=${GITEA_REF#refs/tags/}
|
||||
echo "TAGS=gitea.bv.stef.lan/stef/pki-manager:${TAG_NAME}" >> $GITHUB_OUTPUT
|
||||
echo "TAGS=gitea.bv.stef.lan/stef/pki-manager:latest" >> $GITHUB_OUTPUT
|
||||
else
|
||||
# Pour les commits normaux
|
||||
echo "TAGS=gitea.bv.stef.lan/stef/pki-manager:${SHORT_SHA}" >> $GITHUB_OUTPUT
|
||||
echo "TAGS=gitea.bv.stef.lan/stef/pki-manager:latest" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
echo "Generated tags will be:"
|
||||
echo "${{ steps.docker_tags.outputs.TAGS }}"
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in New Issue