Properly tag releases

This commit is contained in:
Hornwitser 2024-07-20 18:53:37 +02:00
parent 940508eb38
commit 8078c354fc

View file

@ -9,6 +9,23 @@ jobs:
container:
image: sif.g100.hornwitser.no:3000/furnavia/builder:latest
steps:
-
name: Get image tags
id: info
shell: bash
run: |
tee -a ${GITHUB_OUTPUT} <<EOF
TAGS<<EOT
$(
echo ${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
if [[ "${{ github.ref_name }}" =~ ^r[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ${{ env.REGISTRY_IMAGE }}:latest
elif [[ "${{ github.ref_name }}" == forgejo ]]; then
echo ${{ env.REGISTRY_IMAGE }}:development
fi
)
EOT
EOF
-
name: Authenticate
uses: docker/login-action@v3
@ -21,6 +38,4 @@ jobs:
uses: docker/build-push-action@v6
with:
push: true
tags: |
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
${{ env.REGISTRY_IMAGE }}:latest
tags: ${{ steps.info.outputs.TAGS }}