You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ Welcome. This is a simple example application to show a common Docker specific
6
6
GitHub Action setup. We have a Python Flask application that is built and
7
7
deployed in Docker containers using Dockerfiles and Docker Compose.
8
8
9
+
## CI Setup
10
+
9
11
We want to setup CI to test:
10
12
11
13
- ✒ [Every commit to `main`](https://github.com/metcalfc/docker-action-examples/blob/main/.github/workflows/main-ci.yml)
@@ -46,6 +48,38 @@ I'm not going to have GitHub Action manage the deployment side of this example.
46
48
Mostly because I don't want to leave an Amazon ECS cluster running. But you can
47
49
see a demo of this in one of my past streams: https://www.youtube.com/watch?v=RfQrgZFq_P0
48
50
51
+
## GitHub Container Registry FAQ
52
+
53
+
### Where does this `secret.GHCR_TOKEN` come from?
54
+
55
+
The secret isn't automatically populated. The original GitHub Packages container registry did use the automatically generated `GITHUB_TOKEN`. GitHub has said that support for that will be added to this new registry in the future.
56
+
57
+
<br>
58
+
59
+
<blockquoteclass="twitter-tweet"><plang="en"dir="ltr">Support for Actions through GITHUB_TOKEN is coming.</p>— Bryan Clark (@clarkbw) <ahref="https://twitter.com/clarkbw/status/1300853015113396225?ref_src=twsrc%5Etfw">September 1, 2020</a></blockquote>
60
+
61
+
<br>
62
+
63
+
For now you will need to create a GitHub Personal Access Token (PAT) which you can do by going here: https://github.com/settings/tokens
64
+
65
+
You'll need to create the PAT with the correct scopes which you can find here: https://docs.github.com/en/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images#authenticating-with-the-container-registry
66
+
67
+
Once you have the PAT you can create an action secret: https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
68
+
69
+
You can call the secret whatever you want. But `GHCR_TOKEN` is what I used for the example above.
70
+
71
+
### I thought GHRC had anonymous pulls?
72
+
73
+
Its a beta product so the documentation doesn't really exist yet. If you dig around on
74
+
[GitHub's Community site](https://github.community/tag/ghcr) you can find some answers.
75
+
Thats a pain so here is what I've found.
76
+
77
+
`ghcr.io` is private by default. You'll notice in the [nightly.yml](.github/workflows/nightly.yml) I had to do a login to be able to pull the image.
78
+
79
+
You can see what packages you have by going here (change the username): https://github.com/USERNAME?tab=packages&visibility=private
80
+
81
+
You can make it public going to the packages settings (change the username and project name): https://github.com/users/USERNAME/packages/container/PROJECTNAME/settings
0 commit comments