Skip to content

Commit 1444a48

Browse files
authored
Docker authenticated pulls (#298)
* Use authenticated access to Docker hub for all workflows. * Actions can't use secrets.
1 parent fc87e1e commit 1444a48

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v4
2020

21+
- name: Login to Docker Hub
22+
uses: docker/login-action@v3
23+
with:
24+
username: ${{ secrets.DOCKERHUB_USERNAME }}
25+
password: ${{ secrets.DOCKERHUB_TOKEN }}
26+
2127
- name: Set up QEMU
2228
uses: docker/setup-qemu-action@v3
2329

@@ -41,6 +47,12 @@ jobs:
4147
steps:
4248
- uses: actions/checkout@v4
4349

50+
- name: Login to Docker Hub
51+
uses: docker/login-action@v3
52+
with:
53+
username: ${{ secrets.DOCKERHUB_USERNAME }}
54+
password: ${{ secrets.DOCKERHUB_TOKEN }}
55+
4456
- name: Start MongoDB
4557
uses: supercharge/[email protected]
4658
with:
@@ -91,6 +103,12 @@ jobs:
91103
steps:
92104
- uses: actions/checkout@v4
93105

106+
- name: Login to Docker Hub
107+
uses: docker/login-action@v3
108+
with:
109+
username: ${{ secrets.DOCKERHUB_USERNAME }}
110+
password: ${{ secrets.DOCKERHUB_TOKEN }}
111+
94112
- name: Start PostgreSQL
95113
run: |
96114
docker run \
@@ -169,6 +187,12 @@ jobs:
169187
steps:
170188
- uses: actions/checkout@v4
171189

190+
- name: Login to Docker Hub
191+
uses: docker/login-action@v3
192+
with:
193+
username: ${{ secrets.DOCKERHUB_USERNAME }}
194+
password: ${{ secrets.DOCKERHUB_TOKEN }}
195+
172196
- name: Start MySQL
173197
run: |
174198
docker run \
@@ -244,6 +268,12 @@ jobs:
244268
steps:
245269
- uses: actions/checkout@v4
246270

271+
- name: Login to Docker Hub
272+
uses: docker/login-action@v3
273+
with:
274+
username: ${{ secrets.DOCKERHUB_USERNAME }}
275+
password: ${{ secrets.DOCKERHUB_TOKEN }}
276+
247277
- name: Start MongoDB
248278
uses: supercharge/[email protected]
249279
with:

0 commit comments

Comments
 (0)