fix(deps): update rust crate mdbook to 0.4.43 #71
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "11 11 */8 * *" | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
env: | |
DOCKER_BASE_NAME: ghcr.io/hydroxycarbamide/mdbook | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
hadolint: | |
uses: peaceiris/workflows/.github/workflows/[email protected] | |
docker: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 10 | |
permissions: | |
actions: write | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
baseimage: | |
- "alpine:latest" | |
- "rust:alpine" | |
env: | |
DOCKER_CLI_EXPERIMENTAL: enabled | |
DOCKER_BUILDKIT: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set env | |
run: | | |
MDBOOK_VERSION="$(make get-mdbook-version)" | |
MDBOOK_CATPPUCCIN_VERSION="$(make get-mdbook-catppuccin-version)" | |
TAG_NAME="v${MDBOOK_VERSION}" | |
UNVERSIONED_TAG_NAME="alpine" | |
TAG_NAME_LATEST="latest" | |
if [ "${{ startsWith( matrix.baseimage, 'rust:') }}" = "true" ]; then | |
export TAG_NAME="${TAG_NAME}-rust" | |
export UNVERSIONED_TAG_NAME="rust-alpine" | |
fi | |
{ | |
echo "TAG_NAME=${TAG_NAME}" | |
echo "UNVERSIONED_TAG_NAME=${UNVERSIONED_TAG_NAME}" | |
echo "MDBOOK_VERSION=${MDBOOK_VERSION}" | |
echo "MDBOOK_CATPPUCCIN_VERSION=${MDBOOK_CATPPUCCIN_VERSION}" | |
echo "PKG_TAG=${DOCKER_BASE_NAME}:${TAG_NAME}" | |
echo "PKG_TAG_UNVERSIONED=${DOCKER_BASE_NAME}:${UNVERSIONED_TAG_NAME}" | |
echo "PKG_TAG_LATEST=${DOCKER_BASE_NAME}:${TAG_NAME_LATEST}" | |
} >> "${GITHUB_ENV}" | |
- run: docker version | |
- uses: peaceiris/[email protected] | |
id: envs | |
- name: Setup buildx | |
run: | | |
docker buildx create --use --driver docker-container | |
- name: Build ${{ matrix.baseimage }} base image with cache | |
if: ${{ github.event_name == 'pull_request' }} | |
env: | |
ACTIONS_RUNTIME_TOKEN: ${{ steps.envs.outputs.ACTIONS_RUNTIME_TOKEN }} | |
ACTIONS_CACHE_URL: ${{ steps.envs.outputs.ACTIONS_CACHE_URL }} | |
run: | | |
DOCKER_SCOPE="action-image-${GITHUB_REF_NAME}" | |
docker buildx build . \ | |
--tag "${PKG_TAG}" \ | |
--tag "${PKG_TAG_UNVERSIONED}" \ | |
--build-arg MDBOOK_VERSION="${MDBOOK_VERSION}" \ | |
--build-arg MDBOOK_CATPPUCCIN_VERSION="${MDBOOK_CATPPUCCIN_VERSION}" \ | |
--build-arg BASE_IMAGE="${{ matrix.baseimage }}" \ | |
--cache-from "type=gha,scope=${DOCKER_SCOPE}" \ | |
--cache-to "type=gha,mode=max,scope=${DOCKER_SCOPE}" \ | |
--output 'type=docker' | |
- name: Build ${{ matrix.baseimage }} base image without cache | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
docker buildx build . \ | |
--tag "${PKG_TAG}" \ | |
--build-arg MDBOOK_VERSION="${MDBOOK_VERSION}" \ | |
--build-arg MDBOOK_CATPPUCCIN_VERSION="${MDBOOK_CATPPUCCIN_VERSION}" \ | |
--build-arg BASE_IMAGE="${{ matrix.baseimage }}" \ | |
--output 'type=docker' | |
- name: docker tag | |
run: | | |
docker tag "${PKG_TAG}" "${PKG_TAG_LATEST}" | |
docker tag "${PKG_TAG}" "${PKG_TAG_UNVERSIONED}" | |
- run: docker images | |
- run: docker run --rm "${PKG_TAG}" --version | |
- name: Login to Registries | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u hydroxycarbamide --password-stdin | |
- name: Push to GitHub Packages | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
docker push "${PKG_TAG}" | |
docker push "${PKG_TAG_UNVERSIONED}" | |
docker push "${PKG_TAG_LATEST}" |