From 0fc4ad0e0884f0f903ed24a066666d457aa63fcd Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Fri, 16 Oct 2026 00:10:34 -0700 Subject: [PATCH] Drop the GHCR image build; users build with docker compose Publishing a prebuilt image can wait. Remove the GitHub Actions image workflow and the IMAGE_PREFIX/IMAGE_TAG image name in docker-compose.yml, and have the README's quick start build with docker compose up -d --build, which also rebuilds after a git pull. The mirror's docs and script no longer mention Actions or the package. --- .github/workflows/images.yml | 62 ------------------------------------ README.md | 21 +++--------- docker-compose.yml | 3 -- mirror/README.md | 5 +-- mirror/github-mirror.sh | 5 ++- 5 files changed, 8 insertions(+), 88 deletions(-) delete mode 100644 .github/workflows/images.yml diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml deleted file mode 100644 index a33d718..0000000 --- a/.github/workflows/images.yml +++ /dev/null @@ -1,62 +0,0 @@ -# Builds the songtrace image on the GitHub mirror and pushes it to GitHub's -# container registry, under the repository's owner. Gitea ignores this -# directory while .gitea/workflows exists, so the forge does not run it. -name: Images - -on: - push: - branches: [main] - tags: ['v*.*.*'] - workflow_dispatch: - -permissions: - contents: read - packages: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - # The image carries CUDA builds of torch, several GB of them, which is - # more than a hosted runner has free until its preinstalled toolchains - # are gone. - - name: Free disk space - run: | - sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \ - /opt/hostedtoolcache/CodeQL /usr/local/share/boost - sudo docker image prune --all --force - df -h / - - - uses: actions/checkout@v4 - - - name: Lowercase the owner - id: owner - shell: bash - run: echo "name=${GITHUB_REPOSITORY_OWNER,,}" >> "$GITHUB_OUTPUT" - - - uses: docker/setup-buildx-action@v3 - - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ steps.owner.outputs.name }}/songtrace - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} - type=ref,event=branch - - - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64 - provenance: false diff --git a/README.md b/README.md index 5767ec1..c29aa37 100644 --- a/README.md +++ b/README.md @@ -53,22 +53,11 @@ what it got wrong before you sing it. ```sh cp config.example.toml config.toml $EDITOR config.toml # set whisper_url to your Whisper server -docker compose up -d +docker compose up -d --build ``` -Open `http://localhost:8000`, fill in the form and press **CREATE SONG**. - -That builds the image here. To pull the published one instead, put this in a -`.env` file next to `docker-compose.yml` and run -`docker compose pull && docker compose up -d`: - -```sh -IMAGE_PREFIX=ghcr.io/branderson/ -IMAGE_TAG=main -``` - -`main` follows the `main` branch. Release tags will add `latest` for the -newest release and `1.2` for the newest of a minor version. +Open `http://localhost:8000`, fill in the form and press **CREATE SONG**. To +update, `git pull` and run the same `docker compose` command again. Finished songs go to `output_dir` (`/data/output` in the container). To write them straight into your game's song collection, mount that folder there in @@ -225,8 +214,8 @@ pytest installed. Pull requests run the full suite in CI. songtrace is developed on a private forge and published to -[GitHub](https://github.com/branderson/songtrace) as a read-only mirror, which -also builds the published image; see `mirror/README.md`. +[GitHub](https://github.com/branderson/songtrace) as a read-only mirror; see +`mirror/README.md`. `scripts/screenshot_webui.py` regenerates `docs/images/webui.png` from a seeded copy of the app (`playwright install chromium` first). With `ffmpeg` on diff --git a/docker-compose.yml b/docker-compose.yml index a24c77c..cf17570 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,6 @@ services: songtrace: - # built here by default; set IMAGE_PREFIX (and IMAGE_TAG) to pull a - # published image instead, see the README's quick start build: . - image: ${IMAGE_PREFIX:-}songtrace:${IMAGE_TAG:-latest} ports: - "8000:8000" volumes: diff --git a/mirror/README.md b/mirror/README.md index 6839a0a..c2dd20f 100644 --- a/mirror/README.md +++ b/mirror/README.md @@ -4,8 +4,7 @@ songtrace is developed on a private forge. `github-mirror.sh` publishes its `main` and the tags on `main` to [github.com/branderson/songtrace](https://github.com/branderson/songtrace), hourly, from a host that can push to GitHub. Issues and pull requests are off -there. Actions stays on, since `.github/workflows/images.yml` builds the image -that `ghcr.io/branderson/songtrace` serves. +there. The mirror's `main` is the forge's plus one commit, which adds a read-only notice under the README's title. Every forge commit is in the mirror unchanged, and @@ -21,8 +20,6 @@ instead of publishing without the notice. pushing it. 3. Once the first sync has pushed, run `github-mirror.sh --settings` (needs `gh`). It turns off issues, pull requests, projects, wiki and discussions. -4. The first image build creates the package as private. In its settings on - GitHub, set its visibility to public. The timer runs a copy of the script, not the checkout's. Reinstall it after reviewing a change to `mirror/`. diff --git a/mirror/github-mirror.sh b/mirror/github-mirror.sh index 2e158bb..a0386c6 100755 --- a/mirror/github-mirror.sh +++ b/mirror/github-mirror.sh @@ -54,9 +54,8 @@ transform() { || die "README.md: no title to put the mirror notice under" } -# Issues, pull requests, wiki and the like off; Actions stays on, since it -# publishes the image. Settings rather than content, so a sync does not -# reapply them; run once after creating the repository. +# Issues, pull requests, wiki and the like off. Settings rather than content, +# so a sync does not reapply them; run once after creating the repository. settings() { command -v gh >/dev/null || die "--settings needs the gh CLI" gh api -X PATCH "repos/$MIRROR_REPO" --silent \