diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 70c2954..02ea00f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -25,10 +25,10 @@ jobs: - name: Build base image run: docker compose build base - - name: Build shell-* images - run: docker compose build shell-* + - name: Build base-dependent images + run: docker compose build mdbook shell-* - - name: Build shell image + - name: Build shell-* dependent image run: docker compose build shell - name: Upload the images @@ -36,6 +36,7 @@ jobs: tag=latest [[ "$GITHUB_REF" =~ ^refs/tags/ ]] && tag="${GITHUB_REF/refs\/tags\//}" docker image tag ghcr.io/carapace-sh/base ghcr.io/carapace-sh/base:${tag} + docker image tag ghcr.io/carapace-sh/mdbook ghcr.io/carapace-sh/mdbook:${tag} docker image tag ghcr.io/carapace-sh/shell-bash-ble ghcr.io/carapace-sh/shell-bash-ble:${tag} docker image tag ghcr.io/carapace-sh/shell-elvish ghcr.io/carapace-sh/shell-elvish:${tag} docker image tag ghcr.io/carapace-sh/shell-fish ghcr.io/carapace-sh/shell-fish:${tag} @@ -47,6 +48,7 @@ jobs: docker image tag ghcr.io/carapace-sh/shell ghcr.io/carapace-sh/shell:${tag} docker image push ghcr.io/carapace-sh/base:${tag} + docker image push ghcr.io/carapace-sh/mdbook:${tag} docker image push ghcr.io/carapace-sh/shell-bash-ble:${tag} docker image push ghcr.io/carapace-sh/shell-elvish:${tag} docker image push ghcr.io/carapace-sh/shell-fish:${tag} diff --git a/compose.yaml b/compose.yaml index 59ea78c..714a43d 100644 --- a/compose.yaml +++ b/compose.yaml @@ -3,6 +3,11 @@ services: build: base image: ghcr.io/carapace-sh/base + mdbook: + build: mdbook + image: ghcr.io/carapace-sh/mdbook + + shell-bash-ble: build: shell-bash-ble image: ghcr.io/carapace-sh/shell-bash-ble diff --git a/mdbook/Dockerfile b/mdbook/Dockerfile new file mode 100644 index 0000000..d3a7286 --- /dev/null +++ b/mdbook/Dockerfile @@ -0,0 +1,13 @@ +FROM ghcr.io/carapace-sh/base +ARG version=0.4.43 + +RUN apt-get update && apt-get install -y unzip + +RUN curl -L "https://github.com/rust-lang/mdBook/releases/download/v${version}/mdbook-v${version}-x86_64-unknown-linux-gnu.tar.gz" | tar -xvz mdbook \ + && mv mdbook /usr/local/bin/ + +RUN curl -L "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.7/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip" > mdbook-linkcheck.zip \ + && unzip mdbook-linkcheck.zip mdbook-linkcheck \ + && rm mdbook-linkcheck.zip \ + && chmod +x mdbook-linkcheck \ + && mv mdbook-linkcheck /usr/local/bin/