Refactor Docker build workflows (#1221)

* Initial implementation

* Multiple fixes and improvemens

* Better `curl` retries timing

* Remove unused `TARGETOS` and `TARGETVARIANT` vars; add the version fetch fallback code to the build scripts

* Move the fallback code before the var usage

* Use double braces to make the code compatible with the `set -u`

---------

Co-authored-by: Konstantin Koval
This commit is contained in:
Kostiantyn
2025-06-26 11:58:50 +03:00
committed by GitHub
parent 73ae3e8132
commit a8edb30ae4
13 changed files with 371 additions and 144 deletions

View File

@@ -129,12 +129,15 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
annotations: ${{ steps.docker_meta.outputs.annotations }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: |
type=gha,scope=test-ui-${{ hashFiles('ui/package-lock.json') }}
type=gha,scope=test-api-${{ hashFiles('api/go.sum', 'scripts/install_*.sh') }}
cache-to: |
type=gha,mode=max,scope=test-ui-${{ hashFiles('ui/package-lock.json') }}
type=gha,mode=max,scope=test-api-${{ hashFiles('api/go.sum', 'scripts/install_*.sh') }}
build-args: |
NODE_ENV=production
VERSION=${{ github.ref_name }}
COMMIT_SHA=${{ github.sha }}
dockle:
name: Dockle Container Analysis