Drop the GHCR image build; users build with docker compose
tests / test (pull_request_target) Successful in 4m18s
tests / test (pull_request_target) Successful in 4m18s
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.
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
+1
-4
@@ -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/`.
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user