diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 156a917..0000000 --- a/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -# Container image that runs your code -FROM ghcr.io/input-output-hk/catalyst-gh-mdbook-doc:v0.7 - -LABEL maintainer="steven.johnson@iohk.io" -ENV RUST_LOG info - -# used when serving -EXPOSE 3000 - -# Copies your code file from your action repository to the filesystem path `/` of the container -COPY entrypoint.sh /entrypoint.sh - -# Code file to execute when the docker container starts up (`entrypoint.sh`) -ENTRYPOINT ["/entrypoint.sh"] diff --git a/README.md b/README.md index f0eaf34..d09ffeb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Project Catalyst Github Action for supplying Rust and related tools to speed up CI builds +# Project Catalyst Tools Container for supplying Rust and related tools to speed up CI builds -Custom GH Action to speed up and simplify building in CI that requires tools to be built during the CI process. +Container to speed up and simplify building in CI that requires tools to be built during the CI process. ## Tools Provided @@ -15,24 +15,6 @@ Custom GH Action to speed up and simplify building in CI that requires tools to * mdbook-regex * mdbook-admonish -## Inputs - -## `tool-cmd` - -**Required** when `entrypoint` not customized. - -This command is run verbatim, inside the container, at the root of the checked-out repository along with any arguments following it. - -If the `entrypoint` is modified, this only contains the arguments to that `entrypoint` and is not required. - -## `entrypoint` - -**Optional** Over-ride the default entry point. - -## Outputs - -None, other than build artefacts from the executed command. - ## Example usage ### Build mdbook docs and fail on linkcheck @@ -40,20 +22,13 @@ None, other than build artefacts from the executed command. NOTE: *Requires the cargo make command of the project to have a 'build-docs-linkcheck' rule* ```yaml -uses: input-output-hk/catalyst-standards@v0.6 -with: - tool-cmd: cargo make build-docs-linkcheck -``` - -### Use a custom entry point from the repo - -NOTE: *Requires the repo to have the 'my_entrypoint.sh' in its root.* - -```yaml -uses: input-output-hk/catalyst-standards@v0.6 -with: - entrypoint: './my_entrypoint.sh' - tool-cmd: parameters to my entrypoint would go here +runs: + using: 'docker' + image: 'input-output-hk/catalyst-standards:v0.8' + entrypoint: 'cargo' + args: + - 'make' + - 'build-docs-linkcheck' ``` ## How it works @@ -68,20 +43,8 @@ This container is automatically built by github CI using `.github/workflows/buil * Image is called `input-output-hk/catalyst-standards:v??` * Latest Image is updated in `input-output-hk/catalyst-standards:latest` -The `./Dockerfile` is then used by the action when run by the consuming CI. It creates a NEW temporary container and customizes that container's entry point. - -### Optional usage +The `./Dockerfile` is then used by CI to quickly provide all the tools we might need. -Instead of using this GitHub action, the 'input-output-hk/catalyst-standards` tools container can be used directly in CI. +### Recommendation -Example: - -```yaml -runs: - using: 'docker' - image: 'input-output-hk/catalyst-standards:v0.5' - args: - - 'bzz' - pre-entrypoint: 'setup.sh' - entrypoint: 'main.sh' -``` +The specific version of the container should always be specified so that updates do not break builds unexpectedly. diff --git a/action.yml b/action.yml deleted file mode 100644 index 41626d3..0000000 --- a/action.yml +++ /dev/null @@ -1,22 +0,0 @@ -# action.yml -name: 'Project Catalyst Pre-built tooling Build Action' -description: 'Use pre-built tools to speed up and simplify CI' -inputs: - tool-cmd: # id of input - description: 'The command to run' - required: false - default: "" - entrypoint: # Different Entrypoint - description: 'Change the default entrypoint.' - required: false - default: '/entrypoint.sh' -runs: - using: 'docker' - image: 'Dockerfile' - entrypoint: - args: - - ${{ inputs.tool-cmd }} - - ${{ inputs.entrypoint-script }} -branding: - icon: 'settings' - color: 'purple' diff --git a/tools_container/Dockerfile b/tools_container/Dockerfile index 1aa3e81..063927b 100644 --- a/tools_container/Dockerfile +++ b/tools_container/Dockerfile @@ -1,5 +1,5 @@ # Container image that runs your code -FROM rust:1.66.1-slim AS build +FROM rust:1.66.1-slim LABEL maintainer="steven.johnson@iohk.io" ENV RUST_LOG info @@ -43,8 +43,14 @@ RUN cargo install mdbook-open-on-gh --vers ${MDBOOK_OPEN_ON_GH_VERSION} --verbos RUN cargo install mdbook-regex --vers ${MDBOOK_REGEX_VERSION} --verbose RUN cargo install mdbook-admonish --vers ${MDBOOK_ADMONISH_VERSION} --verbose +LABEL maintainer="steven.johnson@iohk.io" +ENV RUST_LOG info + +# used when serving +EXPOSE 3000 + +# Copies your code file from your action repository to the filesystem path `/` of the container +COPY entrypoint.sh /entrypoint.sh -# Nominally this is an `mdbook` Tool container, but we have everything -# the Rust 1.66.1 docker container has available as well any other tools we -# install. -ENTRYPOINT [ "/bin/mdbook" ] \ No newline at end of file +# Code file to execute when the docker container starts up (`entrypoint.sh`) +ENTRYPOINT ["/entrypoint.sh"] diff --git a/entrypoint.sh b/tools_container/entrypoint.sh similarity index 100% rename from entrypoint.sh rename to tools_container/entrypoint.sh