diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 98d981b..f959012 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,9 +23,9 @@ jobs: go-version-file: go.mod - name: Install skopeo run: sudo apt-get update && sudo apt-get install -y skopeo - - name: Log in to GHCR - run: echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io -u "${{ github.actor }}" --password-stdin + - name: Log in to the Gitea registry + run: echo "${{ secrets.DEPLOY_TOKEN }}" | skopeo login git.catlow.cloud -u "${{ github.actor }}" --password-stdin - name: Publish packages and the signed catalogue env: ARCHIPELAGO_CATALOGUE_KEY: ${{ secrets.ARCHIPELAGO_CATALOGUE_KEY }} - run: scripts/publish.sh ghcr.io/${{ github.repository_owner }}/archipelago + run: scripts/publish.sh git.catlow.cloud/sam/archipelago diff --git a/README.md b/README.md index 3903549..158e566 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ so every one of them holds to these before it ships: ## Publish and install -Every push to `main` packs each package to `ghcr.io/samcharles93/archipelago` +Every push to `main` packs each package to `git.catlow.cloud/sam/archipelago` and publishes the catalogue that lists them, signed with the `ARCHIPELAGO_CATALOGUE_KEY` secret. archie-core trusts that catalogue's key, so its Extensions page lists every package with an Install button. diff --git a/scripts/publish.sh b/scripts/publish.sh index 80869e9..3faca79 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -4,11 +4,11 @@ # the catalogue with its issue time and signs it; archie-core refuses a # catalogue older than the newest it has accepted, so the stamp is what keeps # an older validly signed catalogue from being replayed. -# ARCHIPELAGO_CATALOGUE_KEY=... scripts/publish.sh ghcr.io/samcharles93/archipelago +# ARCHIPELAGO_CATALOGUE_KEY=... scripts/publish.sh git.catlow.cloud/sam/archipelago # Each package is -:; the catalogue is catalogue:latest. set -euo pipefail -registry=${1:?registry prefix, e.g. ghcr.io/samcharles93/archipelago} +registry=${1:?registry prefix, e.g. git.catlow.cloud/sam/archipelago} root=$(cd "$(dirname "$0")/.." && pwd) work=$(mktemp -d) trap 'rm -rf "$work"' EXIT