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
|
- name: Log in to Docker Hub
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
uses: docker/login-action@v4
|
uses: nick-fields/retry@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
timeout_minutes: 5
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
max_attempts: 3
|
||||||
|
retry_wait_seconds: 15
|
||||||
|
command: |
|
||||||
|
echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ vars.DOCKERHUB_USERNAME }}" --password-stdin
|
||||||
|
|
||||||
- name: Extract Docker metadata
|
- name: Extract Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
|
|||||||
Reference in new issue
Block a user