Compute SHA in a separate step

This commit is contained in:
Apher 2026-07-16 03:01:28 +00:00
parent c5edef34a6
commit b099a18170

View File

@ -18,6 +18,10 @@ jobs:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Set SHORT_SHA
id: vars
run: echo "short_sha=${GITHUB_SHA::5}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -27,12 +31,10 @@ jobs:
context: .
push: true
platforms: linux/amd64,linux/arm64
build-args: |
BUILD_IDENTIFIER=${{ github.sha.substring(0, 5) }}
BUILD_IDENTIFIER=${{ steps.vars.outputs.short_sha }}
tags: |
gitea.spilum.net/spilum.net/mtf-nlp:${{ github.ref_name }}-${{ github.sha.substring(0, 5) }}
gitea.spilum.net/spilum.net/mtf-nlp:${{ github.ref_name }}-${{ steps.vars.outputs.short_sha }}
gitea.spilum.net/spilum.net/mtf-nlp:${{ github.ref_name }}-latest
- name: Log out from registry