Commit 89f3488 1 parent 0e6c2fa commit 89f3488 Copy full SHA for 89f3488
File tree 1 file changed +19
-3
lines changed
1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 31
31
with :
32
32
token : ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
33
33
34
- - name : Log in to DigitalOcean Container Registry with short-lived credentials
35
- run : doctl registry login --expiry-seconds 1800
34
+ - name : Set up Docker authentication
35
+ run : |
36
+ mkdir -p ${{ env.DOCKER_CONFIG }}
37
+ docker login registry.digitalocean.com -u ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} --password-stdin <<< "${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}"
36
38
37
39
- name : Cleanup old images
38
40
run : |
43
45
run : doctl kubernetes cluster kubeconfig save "chicmoz-prod"
44
46
45
47
- name : Deploy to cluster with Skaffold
46
- run : skaffold run --filename "k8s/production/skaffold.production.yaml"
48
+ run : |
49
+ MAX_RETRIES=3
50
+ RETRY_DELAY=10
51
+
52
+ for i in $(seq 1 $MAX_RETRIES); do
53
+ if skaffold run --filename "k8s/production/skaffold.production.yaml" --default-repo=registry.digitalocean.com/aztlan-containers; then
54
+ echo "Deployment successful"
55
+ exit 0
56
+ fi
57
+ echo "Attempt $i failed. Retrying in $RETRY_DELAY seconds..."
58
+ sleep $RETRY_DELAY
59
+ done
60
+
61
+ echo "Deployment failed after $MAX_RETRIES attempts"
62
+ exit 1
You can’t perform that action at this time.
0 commit comments