From acc1b0de252d08928c507aef30c2676f1317f8f5 Mon Sep 17 00:00:00 2001 From: Elio Bischof Date: Tue, 5 Aug 2025 11:52:10 +0200 Subject: [PATCH] use github.sha --- .github/workflows/login-container.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/login-container.yml b/.github/workflows/login-container.yml index fd493fcdd1..b57747bc67 100644 --- a/.github/workflows/login-container.yml +++ b/.github/workflows/login-container.yml @@ -13,7 +13,7 @@ on: outputs: login_build_image: description: 'The full image tag of the standalone login image' - value: ${{ jobs.login-container.outputs.login_build_image }} + value: ${{ inputs.login_build_image_name }}:${{ github.sha }} permissions: packages: write @@ -34,19 +34,6 @@ jobs: login_build_image: ${{ steps.short-sha.outputs.login_build_image }} steps: - uses: actions/checkout@v4 - - name: Get short SHA - id: short-sha - run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - # For PRs: Use the HEAD SHA (not the merge commit) - SHORT_SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7) - else - # For pushes: Use the current commit - SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7) - fi - echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT - echo "login_build_image=${{ inputs.login_build_image_name }}:$SHORT_SHA" >> $GITHUB_OUTPUT - echo "Short SHA: $SHORT_SHA" - name: Login meta id: login-meta uses: docker/metadata-action@v5 @@ -56,7 +43,7 @@ jobs: annotations: | manifest:org.opencontainers.image.licenses=MIT tags: | - type=raw,value=${{ steps.short-sha.outputs.short_sha }} + type=sha,prefix=,suffix=-debug,format=long - name: Login to Docker registry uses: docker/login-action@v3 with: