mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 21:59:12 +00:00
Fix GitHub commit passing, UI build and cache for different purposes (#1239)
* Fix GitHub commit passing, UI build and cache for different purposes * a logging for transparency and easy debug * Fix var expanding with quotes and add intermediate verification commands * split verification commands * fix joining commands * Ecplicitly pull latest deps image * properly set arg default values and try to fix preparation step * another try to build the image with the correct deps tag * Revert the dynamic deps tag discovery, as it doesn't work and the actual `latest` image is pulled implicitly anyway * Final optimizations * "NoCommit" placeholder, indent fix, var rename --------- Co-authored-by: Konstantin Koval
This commit is contained in:
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@@ -80,7 +80,12 @@ jobs:
|
||||
ref: ${{ matrix.tags.ref }}
|
||||
|
||||
- name: Fetch branches
|
||||
run: git fetch --all
|
||||
id: git
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git fetch --all
|
||||
echo "COMMIT_SHORT_SHA=$(git rev-parse --short HEAD)" | tee -a $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@@ -121,6 +126,7 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
target: release
|
||||
sbom: true
|
||||
provenance: mode=max
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
@@ -130,14 +136,15 @@ jobs:
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
annotations: ${{ steps.docker_meta.outputs.annotations }}
|
||||
cache-from: |
|
||||
type=gha,scope=test-ui-${{ hashFiles('ui/package-lock.json') }}
|
||||
type=gha,scope=ui-${{ hashFiles('ui/package-lock.json') }}
|
||||
type=gha,scope=test-api-${{ hashFiles('api/go.sum', 'scripts/install_*.sh', 'dependencies/*') }}
|
||||
cache-to: |
|
||||
type=gha,mode=max,scope=test-ui-${{ hashFiles('ui/package-lock.json') }}
|
||||
type=gha,mode=max,scope=ui-${{ hashFiles('ui/package-lock.json') }}
|
||||
type=gha,mode=max,scope=test-api-${{ hashFiles('api/go.sum', 'scripts/install_*.sh', 'dependencies/*') }}
|
||||
build-args: |
|
||||
NODE_ENV=production
|
||||
VERSION=${{ github.ref_name }}
|
||||
COMMIT_SHA=${{ steps.git.outputs.COMMIT_SHORT_SHA }}
|
||||
|
||||
dockle:
|
||||
name: Dockle Container Analysis
|
||||
|
||||
1
.github/workflows/tests.yml
vendored
1
.github/workflows/tests.yml
vendored
@@ -112,6 +112,7 @@ jobs:
|
||||
target: ui
|
||||
tags: photoview/ui
|
||||
cache-from: type=gha,scope=test-ui-${{ hashFiles('ui/package-lock.json') }}
|
||||
cache-to: type=gha,mode=max,scope=test-ui-${{ hashFiles('ui/package-lock.json') }}
|
||||
build-args: |
|
||||
NODE_ENV=testing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user