File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -326,6 +326,8 @@ For that last step to happen,
326
326
the code owner's DockerHub credentials must be stored in the GitHub repository
327
327
as [GitHub repository secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions).
328
328
329
+ Example .`github/workflows/docker-publish.yml` file :
330
+
329
331
` ` ` yaml
330
332
# Publishes docker image, pinning actions to a commit SHA,
331
333
# and updating most recently built image with the latest tag.
339
341
push :
340
342
paths :
341
343
- ' Dockerfile'
344
+ - .github/workflows/docker-publish.yml # or whatever you named the file
342
345
- ' conda-linux-64.lock'
343
346
344
347
jobs :
@@ -352,14 +355,14 @@ jobs:
352
355
- name : Log in to Docker Hub
353
356
uses : docker/login-action@v3
354
357
with :
355
- username : ${{ secrets.DOCKER_USERNAME }}
356
- password : ${{ secrets.DOCKER_PASSWORD }}
358
+ username : ${{ secrets.DOCKER_USERNAME }} # do not change, add as secret
359
+ password : ${{ secrets.DOCKER_PASSWORD }} # do not change, add as secret
357
360
358
361
- name : Extract metadata (tags, labels) for Docker
359
362
id : meta
360
363
uses : docker/metadata-action@v5
361
364
with :
362
- images : ttimbers/dsci522-dockerfile-practice
365
+ images : ttimbers/dsci522-dockerfile-practice # change to your image
363
366
tags : |
364
367
type=raw, value={{sha}},enable=${{github.ref_type != 'tag' }}
365
368
type=raw, value=latest
You can’t perform that action at this time.
0 commit comments