Skip to content

Commit fd724f4

Browse files
committed
Host container image at ghcr.io/bpurinton/* via GHCR_PAT
The source repo lives at uw-cryo but the package needs admin rights to flip visibility, which Ben doesn't have on the uw-cryo org. Switching the image to bpurinton's namespace where Ben controls the package. Workflow now authenticates with a classic PAT (GHCR_PAT secret) instead of GITHUB_TOKEN since cross-owner pushes need explicit auth.
1 parent 91431c4 commit fd724f4

4 files changed

Lines changed: 23 additions & 19 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
//
88
// First-launch time drops from ~5 min (build) to ~30-90 s (pull) because
99
// ASP binaries + the conda env are already baked in.
10-
"image": "ghcr.io/uw-cryo/stereopipeline-quickstart:latest",
10+
"image": "ghcr.io/bpurinton/stereopipeline-quickstart:latest",
1111

1212
// Local-build fallback — uncomment this `build:` block (and comment out the
1313
// `image:` line above) if you've forked the repo and don't have access to
14-
// the uw-cryo/* GHCR namespace, or want to rebuild offline. Note the
14+
// the bpurinton/* GHCR namespace, or want to rebuild offline. Note the
1515
// context: ".." — it makes the build context the repo root so the
1616
// Dockerfile's `COPY .devcontainer/environment.yml ...` resolves correctly.
1717
//

.github/workflows/asp-version-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,4 @@ jobs:
172172
- [ ] Read the [ASP release notes](https://github.com/NeoGeographyToolkit/StereoPipeline/releases/tag/${{ steps.asp.outputs.version }}) for breaking changes that might affect the tutorial notebooks (CLI flag renames, new sensor-prep paths, output-file renames).
173173
- [ ] Skim `notebooks/01_aster_rainier.ipynb` and `notebooks/02_worldview_ucsd.ipynb` for any flag this release changes.
174174
- [ ] Close any older auto-bump PRs from this workflow that this one supersedes — the workflow doesn't do that for you.
175-
- [ ] Once merged, watch `Build & push container image` complete — the new image lands at `ghcr.io/uw-cryo/stereopipeline-quickstart:asp-${{ steps.asp.outputs.version }}` and `:latest`.
175+
- [ ] Once merged, watch `Build & push container image` complete — the new image lands at `ghcr.io/bpurinton/stereopipeline-quickstart:asp-${{ steps.asp.outputs.version }}` and `:latest`.

.github/workflows/build-image.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ name: Build & push container image
44
# + dev tools) and pushes it to GHCR so Codespaces can pull it instead of
55
# building from source on first launch.
66
#
7-
# Image lives at ghcr.io/uw-cryo/stereopipeline-quickstart, matching the
8-
# repo owner — that means the default GITHUB_TOKEN has the push rights it
9-
# needs (no PAT secret required). If you ever fork/move this repo to a
10-
# different namespace and want the image to follow, just change IMAGE_NAME
11-
# below; the rest works automatically. If you want the image to live in a
12-
# different namespace than the repo owner, you'll need a PAT with
13-
# `write:packages` scope on that account, stored as a repo secret, and the
14-
# `username:`/`password:` lines below swapped to use it.
7+
# Image lives at ghcr.io/bpurinton/stereopipeline-quickstart — a different
8+
# namespace from the source repo (uw-cryo/stereopipeline-quickstart). The
9+
# default GITHUB_TOKEN can only push to packages owned by this repo's owner,
10+
# so we use a PAT instead:
11+
#
12+
# 1. On bpurinton's GitHub account, create a classic PAT at
13+
# https://github.com/settings/tokens with at least `write:packages`
14+
# scope (and `read:packages` for buildcache pulls).
15+
# 2. Add it to this repo as an Actions secret named `GHCR_PAT`
16+
# (Settings → Secrets and variables → Actions → New repository secret).
17+
# 3. The `Log in to GHCR` step below uses `username: bpurinton` and
18+
# `password: ${{ secrets.GHCR_PAT }}`.
1519
#
1620
# Tags pushed: `latest`, the short git SHA, and `asp-${ASP_VERSION}` so users
1721
# can pin to a specific ASP release if needed.
@@ -40,10 +44,10 @@ on:
4044

4145
env:
4246
REGISTRY: ghcr.io
43-
# Image namespace matches the repo owner so GITHUB_TOKEN is sufficient.
44-
# Change this (and the devcontainer.json `image:` line) if you ever move
45-
# hosting; cross-namespace pushes need a PAT secret (see header comment).
46-
IMAGE_NAME: uw-cryo/stereopipeline-quickstart
47+
# Image hosted under bpurinton's GHCR namespace (separate from the source
48+
# repo's owner). Push auth uses the GHCR_PAT secret — see header comment
49+
# for setup. Change this if you ever move hosting.
50+
IMAGE_NAME: bpurinton/stereopipeline-quickstart
4751

4852
jobs:
4953
build:
@@ -63,8 +67,8 @@ jobs:
6367
uses: docker/login-action@v3
6468
with:
6569
registry: ${{ env.REGISTRY }}
66-
username: ${{ github.actor }}
67-
password: ${{ secrets.GITHUB_TOKEN }}
70+
username: bpurinton
71+
password: ${{ secrets.GHCR_PAT }}
6872

6973
- name: Resolve ASP build args
7074
id: asp

docs/start/codespaces.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Open in GitHub Codespaces
1313
```
1414

15-
2. **First boot takes ~1-2 minutes.** GitHub pulls a pre-built container image from [GHCR](https://ghcr.io/uw-cryo/stereopipeline-quickstart) — ASP binaries and the `asp_plot` conda env are already baked in. Subsequent launches reuse the cached image and start in under 30 seconds. (If you've forked the repo and don't have access to the `uw-cryo/*` GHCR namespace, the devcontainer.json includes a commented-out `build:` block you can flip on — first boot then takes ~5 minutes for the from-source build.)
15+
2. **First boot takes ~1-2 minutes.** GitHub pulls a pre-built container image from [GHCR](https://ghcr.io/bpurinton/stereopipeline-quickstart) — ASP binaries and the `asp_plot` conda env are already baked in. Subsequent launches reuse the cached image and start in under 30 seconds. (If the image isn't accessible from your fork, the devcontainer.json includes a commented-out `build:` block you can flip on — first boot then takes ~5 minutes for the from-source build.)
1616

1717
3. When VS Code opens in your browser, the terminal will show a friendly banner:
1818

@@ -64,7 +64,7 @@ If you'd rather not use Codespaces, see [the local install guide](installation.m
6464

6565
::::{dropdown} The Codespace fails to pull the image (manifest unknown / unauthorized)
6666
:icon: alert
67-
The default `image:` in `.devcontainer/devcontainer.json` points at `ghcr.io/uw-cryo/stereopipeline-quickstart:latest`. If that image hasn't been built yet, was deleted, or has restrictive visibility, the pull will fail. Two paths forward:
67+
The default `image:` in `.devcontainer/devcontainer.json` points at `ghcr.io/bpurinton/stereopipeline-quickstart:latest`. If that image hasn't been built yet, was deleted, or its visibility is private, the pull will fail. Two paths forward:
6868
1. **Build from source instead.** Edit `.devcontainer/devcontainer.json`: comment out the `image:` line and uncomment the `build:` block. The Codespace will run `docker build` against the in-repo `Dockerfile` on first launch (~5 min).
6969
2. **Trigger the image build.** Run the `Build & push container image` workflow under Actions in your fork — once it succeeds the `latest` tag will exist and the pull will work. Make sure the repo's package settings allow public pulls if you want the image accessible without auth.
7070
::::

0 commit comments

Comments
 (0)