mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
New docker workflow.
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
Some checks are pending
Node.js CI / build (postgresql, 18.18, 10) (push) Waiting to run
This commit is contained in:
parent
de6515139e
commit
6ba9c1c40c
1 changed files with 20 additions and 12 deletions
32
.github/workflows/cd.yml
vendored
32
.github/workflows/cd.yml
vendored
|
|
@ -78,15 +78,23 @@ jobs:
|
||||||
echo "Computed tags: $TAGS"
|
echo "Computed tags: $TAGS"
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
id: build
|
run: |
|
||||||
uses: docker/build-push-action@v6
|
TAGS="${{ steps.compute.outputs.tags }}"
|
||||||
with:
|
|
||||||
context: .
|
# Set image targets conditionally
|
||||||
push: true
|
if [[ "${{ github.repository }}" == "umami-software/umami" ]]; then
|
||||||
platforms: linux/amd64,linux/arm64
|
IMAGES=("umamisoftware/umami" "ghcr.io/${{ github.repository }}")
|
||||||
cache-from: type=gha
|
else
|
||||||
cache-to: type=gha,mode=max
|
IMAGES=("ghcr.io/${{ github.repository }}")
|
||||||
provenance: false
|
fi
|
||||||
tags: |
|
|
||||||
ghcr.io/${{ github.repository }}:${{ steps.compute.outputs.tags }}
|
for IMAGE in "${IMAGES[@]}"; do
|
||||||
${{ github.repository == 'umami-software/umami' && format('umamisoftware/umami:{0}', steps.compute.outputs.tags) || '' }}
|
echo "Building and pushing $IMAGE with tags: $TAGS"
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--push \
|
||||||
|
$(echo "$TAGS" | tr ',' '\n' | sed "s|^|--tag ${IMAGE}:|") \
|
||||||
|
--cache-from type=gha \
|
||||||
|
--cache-to type=gha,mode=max \
|
||||||
|
.
|
||||||
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue