diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9455c1f..a2948c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,14 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + # Login to GitHub Container Registry before push. + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GO_RELEASER_TOKEN }} + # Build and release - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 diff --git a/.goreleaser.yml b/.goreleaser.yml index 516049b..31c6c68 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -70,6 +70,7 @@ brews: dockers: - image_templates: - "ikawaha/kagome:{{ .Version }}-amd64" + - "ghcr.io/ikawaha/kagome:{{ .Version }}-amd64" use: buildx goarch: amd64 dockerfile: Dockerfile @@ -78,6 +79,7 @@ dockers: - image_templates: - "ikawaha/kagome:{{ .Version }}-arm64" + - "ghcr.io/ikawaha/kagome:{{ .Version }}-arm64" use: buildx goarch: arm64 dockerfile: Dockerfile @@ -86,6 +88,7 @@ dockers: - image_templates: - "ikawaha/kagome:{{ .Version }}-arm32v5" + - "ghcr.io/ikawaha/kagome:{{ .Version }}-arm32v5" use: buildx goarch: arm goarm: 5 @@ -95,6 +98,7 @@ dockers: - image_templates: - "ikawaha/kagome:{{ .Version }}-arm32v6" + - "ghcr.io/ikawaha/kagome:{{ .Version }}-arm32v6" use: buildx goarch: arm goarm: 6 @@ -104,6 +108,7 @@ dockers: - image_templates: - "ikawaha/kagome:{{ .Version }}-arm32v7" + - "ghcr.io/ikawaha/kagome:{{ .Version }}-arm32v7" use: buildx goarch: arm goarm: 7 @@ -114,6 +119,7 @@ dockers: # Create multiarch manifest file of Docker image. This will bind all the images # above into a single manifest file for "latest" and each version tag. docker_manifests: + # Manifest for Docker Hub - name_template: ikawaha/kagome:{{ .Version }} image_templates: - ikawaha/kagome:{{ .Version }}-amd64 @@ -127,4 +133,20 @@ docker_manifests: - ikawaha/kagome:{{ .Version }}-arm64 - ikawaha/kagome:{{ .Version }}-arm32v5 - ikawaha/kagome:{{ .Version }}-arm32v6 - - ikawaha/kagome:{{ .Version }}-arm32v7 \ No newline at end of file + - ikawaha/kagome:{{ .Version }}-arm32v7 + + # Manifest for GitHub Container Registry + - name_template: ghcr.io/ikawaha/kagome:{{ .Version }} + image_templates: + - ghcr.io/ikawaha/kagome:{{ .Version }}-amd64 + - ghcr.io/ikawaha/kagome:{{ .Version }}-arm64 + - ghcr.io/ikawaha/kagome:{{ .Version }}-arm32v5 + - ghcr.io/ikawaha/kagome:{{ .Version }}-arm32v6 + - ghcr.io/ikawaha/kagome:{{ .Version }}-arm32v7 + - name_template: ghcr.io/ikawaha/kagome:latest + image_templates: + - ghcr.io/ikawaha/kagome:{{ .Version }}-amd64 + - ghcr.io/ikawaha/kagome:{{ .Version }}-arm64 + - ghcr.io/ikawaha/kagome:{{ .Version }}-arm32v5 + - ghcr.io/ikawaha/kagome:{{ .Version }}-arm32v6 + - ghcr.io/ikawaha/kagome:{{ .Version }}-arm32v7 diff --git a/README.md b/README.md index e3e00e5..32b0771 100644 --- a/README.md +++ b/README.md @@ -276,16 +276,25 @@ A debug tool of tokenize process outputs a lattice in graphviz dot format. ```sh # Compatible architectures: AMD64, Arm64, Arm32 (Arm v5, v6 and v7) docker pull ikawaha/kagome:latest + +# Alternatively, you can pull from GitHub Container Registry +docker pull ghcr.io/ikawaha/kagome:latest ``` ```sh # Interactive/REPL mode docker run --rm -it ikawaha/kagome:latest + +# If pulling from GitHub Container Registry +docker run --rm -it ghcr.io/ikawaha/kagome:latest ``` ```sh # Server mode (http://localhost:6060) docker run --rm -p 6060:6060 ikawaha/kagome:latest server + +# If pulling from GitHub Container Registry +docker run --rm -p 6060:6060 ghcr.io/ikawaha/kagome:latest server ``` # Building to WebAssembly