Retry Docker Hub login on handshake timeout
Wrap docker/login-action with nick-fields/retry (3 attempts, 15s backoff) so transient DockerHub TLS handshake timeouts do not fail the build.
This commit is contained in:
1 parent
69dc5cf7a6
commit
878ac92948
1 file changed
+6
-3
@@ -43,10 +43,13 @@ jobs:
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
uses: docker/login-action@v4
|
||||
uses: nick-fields/retry@v3
|
||||
with:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
timeout_minutes: 5
|
||||
max_attempts: 3
|
||||
retry_wait_seconds: 15
|
||||
command: |
|
||||
echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ vars.DOCKERHUB_USERNAME }}" --password-stdin
|
||||
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
|
||||
Reference in new issue
Block a user