Skip to content

Commit 89f3488

Browse files
committed
change to docker login
1 parent 0e6c2fa commit 89f3488

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/chicmoz-prod.yml

+19-3
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ jobs:
3131
with:
3232
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
3333

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 }}"
3638
3739
- name: Cleanup old images
3840
run: |
@@ -43,4 +45,18 @@ jobs:
4345
run: doctl kubernetes cluster kubeconfig save "chicmoz-prod"
4446

4547
- 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

0 commit comments

Comments
 (0)