Skip to content

Commit aef28d1

Browse files
authored
feat: add docker login on dockerhub registry to use iExec rate limits (#113)
1 parent d767898 commit aef28d1

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ on:
5252
default: "linux/amd64"
5353
type: string
5454
secrets:
55+
dockerhub-username:
56+
required: true
57+
dockerhub-password:
58+
required: true
5559
username:
5660
required: false
5761
password:
@@ -104,6 +108,12 @@ jobs:
104108
uses: docker/setup-qemu-action@v4
105109

106110
- name: Login to Docker Hub
111+
uses: docker/login-action@v4
112+
with:
113+
username: ${{ secrets.dockerhub-username }}
114+
password: ${{ secrets.dockerhub-password }}
115+
116+
- name: Login to Docker Registry
107117
if: ${{ inputs.push }}
108118
uses: docker/login-action@v4
109119
with:

docker-build/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ Perfect for teams looking to streamline their containerization workflow with min
4040

4141
## 🔐 Secrets
4242

43-
| Name | Description | Required |
44-
| ---------- | --------------------------------------------------------------------------------------------------- | -------- |
45-
| `username` | Username for Docker Registry authentication | Yes |
46-
| `password` | Password or Personal Access Token for Docker registry authentication (with appropriate permissions) | Yes |
43+
| Name | Description | Required |
44+
| -------------------- | --------------------------------------------------------------------------------------------------- | ------------------ |
45+
| `dockerhub-username` | Username for Docker Hub authentication | Yes |
46+
| `dockerhub-password` | Token for Docker Hub authentication (with read-only permissions) | Yes |
47+
| `username` | Username for Docker Registry authentication | When `push: true` |
48+
| `password` | Password or Personal Access Token for Docker registry authentication (with appropriate permissions) | When `push: true` |
4749

4850
## 💻 Example Usage
4951

@@ -74,6 +76,8 @@ jobs:
7476
BUILD_VERSION=1.0.0
7577
NODE_ENV=production
7678
secrets:
79+
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
80+
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN_PULL_ONLY }}
7781
username: ${{ secrets.DOCKERHUB_USERNAME }}
7882
password: ${{ secrets.DOCKERHUB_PAT }}
7983
```

0 commit comments

Comments
 (0)