Skip to content

Commit f1efa54

Browse files
committed
add comments to example github actions file
1 parent ed84d6e commit f1efa54

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

book/lectures/120-containerization-3.qmd

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ For that last step to happen,
326326
the code owner's DockerHub credentials must be stored in the GitHub repository
327327
as [GitHub repository secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions).
328328

329+
Example .`github/workflows/docker-publish.yml` file:
330+
329331
```yaml
330332
# Publishes docker image, pinning actions to a commit SHA,
331333
# and updating most recently built image with the latest tag.
@@ -339,6 +341,7 @@ on:
339341
push:
340342
paths:
341343
- 'Dockerfile'
344+
- .github/workflows/docker-publish.yml # or whatever you named the file
342345
- 'conda-linux-64.lock'
343346

344347
jobs:
@@ -352,14 +355,14 @@ jobs:
352355
- name: Log in to Docker Hub
353356
uses: docker/login-action@v3
354357
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
357360

358361
- name: Extract metadata (tags, labels) for Docker
359362
id: meta
360363
uses: docker/metadata-action@v5
361364
with:
362-
images: ttimbers/dsci522-dockerfile-practice
365+
images: ttimbers/dsci522-dockerfile-practice # change to your image
363366
tags: |
364367
type=raw, value={{sha}},enable=${{github.ref_type != 'tag' }}
365368
type=raw, value=latest

0 commit comments

Comments
 (0)