@@ -121,15 +121,35 @@ Images are hosted at `ghcr.io/cfengine` and versioned via `IMAGE_VERSION` in
121121```
122122
123123` --push-image ` always builds with ` --no-cache ` to pick up the latest upstream
124- packages, then pushes to the registry.
124+ packages, then pushes to the registry. However, you must be logged in to
125+ ` ghcr.io ` first. You can log in with a personal access token (classic) that has
126+ the write: packages scope. Alternatively, trigger the GitHub Actions workflow
127+ which handles authentication automatically.
128+
129+ #### GitHub Actions workflow
130+
131+ The ` build-base-images.yml ` workflow builds and pushes images for every
132+ supported platform. It is triggered manually via ` workflow_dispatch ` .
133+
134+ The workflow authenticates to ` ghcr.io ` using the automatic ` GITHUB_TOKEN `
135+ provided by GitHub Actions. For this to work:
136+
137+ - The repository must grant ` GITHUB_TOKEN ` write access to packages. In the
138+ GitHub repository settings, go to ** Actions → General → Workflow permissions**
139+ and select ** Read and write permissions** .
140+ - After the first push, each package defaults to private. To allow anonymous
141+ pulls, go to the package on GitHub (** your org → Packages** ), open ** Package
142+ settings** , and change the visibility to ** Public** . This is a one-time step
143+ per package — new tags (e.g. from bumping ` IMAGE_VERSION ` ) inherit the
144+ existing visibility.
125145
126146### Updating the toolchain
127147
1281481 . Edit ` container/Dockerfile.debian ` as needed
1291492 . Test locally with ` --rebuild-image `
1301503 . Bump ` IMAGE_VERSION ` in ` build-in-container.py `
1311514 . Commit the Dockerfile change + version bump
132- 5 . Push new images with ` --push-image ` (or trigger the GitHub Actions workflow)
152+ 5 . Push new images by triggering the GitHub Actions workflow
133153
134154## Debugging
135155
0 commit comments