fix build issues
This commit is contained in:
35
.github/workflows/container_latest.yml
vendored
35
.github/workflows/container_latest.yml
vendored
@@ -134,15 +134,42 @@ jobs:
|
|||||||
password: ${{ secrets.GHCR_TOKEN }}
|
password: ${{ secrets.GHCR_TOKEN }}
|
||||||
- name: Create and push manifest
|
- name: Create and push manifest
|
||||||
run: |
|
run: |
|
||||||
# Create manifest for Docker Hub
|
# Function to retry command with exponential backoff
|
||||||
docker buildx imagetools create -t chrislusf/seaweedfs:latest \
|
retry_with_backoff() {
|
||||||
|
local max_attempts=5
|
||||||
|
local timeout=1
|
||||||
|
local attempt=1
|
||||||
|
local exit_code=0
|
||||||
|
|
||||||
|
while [ $attempt -le $max_attempts ]; do
|
||||||
|
if "$@"; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
exit_code=$?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $attempt -lt $max_attempts ]; then
|
||||||
|
echo "Attempt $attempt failed. Retrying in ${timeout}s..." >&2
|
||||||
|
sleep $timeout
|
||||||
|
timeout=$((timeout * 2))
|
||||||
|
fi
|
||||||
|
|
||||||
|
attempt=$((attempt + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Command failed after $max_attempts attempts" >&2
|
||||||
|
return $exit_code
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create manifest for Docker Hub with retry
|
||||||
|
retry_with_backoff docker buildx imagetools create -t chrislusf/seaweedfs:latest \
|
||||||
chrislusf/seaweedfs:latest-amd64 \
|
chrislusf/seaweedfs:latest-amd64 \
|
||||||
chrislusf/seaweedfs:latest-arm64 \
|
chrislusf/seaweedfs:latest-arm64 \
|
||||||
chrislusf/seaweedfs:latest-arm \
|
chrislusf/seaweedfs:latest-arm \
|
||||||
chrislusf/seaweedfs:latest-386
|
chrislusf/seaweedfs:latest-386
|
||||||
|
|
||||||
# Create manifest for GHCR
|
# Create manifest for GHCR with retry
|
||||||
docker buildx imagetools create -t ghcr.io/chrislusf/seaweedfs:latest \
|
retry_with_backoff docker buildx imagetools create -t ghcr.io/chrislusf/seaweedfs:latest \
|
||||||
ghcr.io/chrislusf/seaweedfs:latest-amd64 \
|
ghcr.io/chrislusf/seaweedfs:latest-amd64 \
|
||||||
ghcr.io/chrislusf/seaweedfs:latest-arm64 \
|
ghcr.io/chrislusf/seaweedfs:latest-arm64 \
|
||||||
ghcr.io/chrislusf/seaweedfs:latest-arm \
|
ghcr.io/chrislusf/seaweedfs:latest-arm \
|
||||||
|
|||||||
30
.github/workflows/container_release1.yml
vendored
30
.github/workflows/container_release1.yml
vendored
@@ -114,7 +114,35 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: Create and push manifest
|
- name: Create and push manifest
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools create -t ${{ steps.docker_meta.outputs.tags }} \
|
# Function to retry command with exponential backoff
|
||||||
|
retry_with_backoff() {
|
||||||
|
local max_attempts=5
|
||||||
|
local timeout=1
|
||||||
|
local attempt=1
|
||||||
|
local exit_code=0
|
||||||
|
|
||||||
|
while [ $attempt -le $max_attempts ]; do
|
||||||
|
if "$@"; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
exit_code=$?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $attempt -lt $max_attempts ]; then
|
||||||
|
echo "Attempt $attempt failed. Retrying in ${timeout}s..." >&2
|
||||||
|
sleep $timeout
|
||||||
|
timeout=$((timeout * 2))
|
||||||
|
fi
|
||||||
|
|
||||||
|
attempt=$((attempt + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Command failed after $max_attempts attempts" >&2
|
||||||
|
return $exit_code
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create manifest with retry
|
||||||
|
retry_with_backoff docker buildx imagetools create -t ${{ steps.docker_meta.outputs.tags }} \
|
||||||
${{ steps.docker_meta.outputs.tags }}-amd64 \
|
${{ steps.docker_meta.outputs.tags }}-amd64 \
|
||||||
${{ steps.docker_meta.outputs.tags }}-arm64 \
|
${{ steps.docker_meta.outputs.tags }}-arm64 \
|
||||||
${{ steps.docker_meta.outputs.tags }}-arm \
|
${{ steps.docker_meta.outputs.tags }}-arm \
|
||||||
|
|||||||
30
.github/workflows/container_release2.yml
vendored
30
.github/workflows/container_release2.yml
vendored
@@ -115,7 +115,35 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: Create and push manifest
|
- name: Create and push manifest
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools create -t ${{ steps.docker_meta.outputs.tags }} \
|
# Function to retry command with exponential backoff
|
||||||
|
retry_with_backoff() {
|
||||||
|
local max_attempts=5
|
||||||
|
local timeout=1
|
||||||
|
local attempt=1
|
||||||
|
local exit_code=0
|
||||||
|
|
||||||
|
while [ $attempt -le $max_attempts ]; do
|
||||||
|
if "$@"; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
exit_code=$?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $attempt -lt $max_attempts ]; then
|
||||||
|
echo "Attempt $attempt failed. Retrying in ${timeout}s..." >&2
|
||||||
|
sleep $timeout
|
||||||
|
timeout=$((timeout * 2))
|
||||||
|
fi
|
||||||
|
|
||||||
|
attempt=$((attempt + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Command failed after $max_attempts attempts" >&2
|
||||||
|
return $exit_code
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create manifest with retry
|
||||||
|
retry_with_backoff docker buildx imagetools create -t ${{ steps.docker_meta.outputs.tags }} \
|
||||||
${{ steps.docker_meta.outputs.tags }}-amd64 \
|
${{ steps.docker_meta.outputs.tags }}-amd64 \
|
||||||
${{ steps.docker_meta.outputs.tags }}-arm64 \
|
${{ steps.docker_meta.outputs.tags }}-arm64 \
|
||||||
${{ steps.docker_meta.outputs.tags }}-arm \
|
${{ steps.docker_meta.outputs.tags }}-arm \
|
||||||
|
|||||||
Reference in New Issue
Block a user