mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Updated worfkflow.
This commit is contained in:
parent
2a71cc721b
commit
9b0d1b092e
1 changed files with 24 additions and 20 deletions
44
.github/workflows/cd.yml
vendored
44
.github/workflows/cd.yml
vendored
|
|
@ -27,6 +27,9 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
|
@ -88,24 +91,25 @@ jobs:
|
||||||
echo "tags=$TAGS" >> $GITHUB_OUTPUT
|
echo "tags=$TAGS" >> $GITHUB_OUTPUT
|
||||||
echo "Computed tags: $TAGS"
|
echo "Computed tags: $TAGS"
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push to GHCR
|
||||||
run: |
|
uses: mr-smithers-excellent/docker-build-push@v6
|
||||||
TAGS="${{ steps.compute.outputs.tags }}"
|
with:
|
||||||
|
image: ${{ github.repository }}
|
||||||
|
tags: ${{ steps.compute.outputs.tags }}
|
||||||
|
registry: ghcr.io
|
||||||
|
multiPlatform: true
|
||||||
|
platform: linux/amd64,linux/arm64
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# Set image targets conditionally
|
- name: Build and push to Docker Hub
|
||||||
if [[ "${{ github.repository }}" == "umami-software/umami" ]]; then
|
if: github.repository == 'umami-software/umami'
|
||||||
IMAGES=("umamisoftware/umami" "ghcr.io/${{ github.repository }}")
|
uses: mr-smithers-excellent/docker-build-push@v6
|
||||||
else
|
with:
|
||||||
IMAGES=("ghcr.io/${{ github.repository }}")
|
image: umamisoftware/umami
|
||||||
fi
|
tags: ${{ steps.compute.outputs.tags }}
|
||||||
|
registry: docker.io
|
||||||
for IMAGE in "${IMAGES[@]}"; do
|
multiPlatform: true
|
||||||
echo "Building and pushing $IMAGE with tags: $TAGS"
|
platform: linux/amd64,linux/arm64
|
||||||
docker buildx build \
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
--platform linux/amd64,linux/arm64 \
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
--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