Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# See https://github.com/devcontainers/images/blob/main/src/base-trixie/.devcontainer/Dockerfile
FROM mcr.microsoft.com/devcontainers/base:trixie

Check warning on line 2 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (trixie)

# This Dockerfile installs Bun and textlint with its plugins globally.

Check warning on line 4 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (textlint)

# Install OS dependencies and Bun globally
USER root
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

Check warning on line 8 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (pipefail)
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

Check warning on line 9 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (noninteractive)
&& apt-get -y install --no-install-recommends unzip curl \
&& curl -fsSL https://bun.sh/install | bash \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
SHELL ["/bin/bash", "-c"]

# Add Bun to the PATH
ENV PATH="/root/.bun/bin:${PATH}"

# Install textlint and plugins globally

Check warning on line 19 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (textlint)
RUN bun add --global \
textlint@^15.2.2 \

Check warning on line 21 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (textlint)
textlint-filter-rule-comments@^1.2.2 \

Check warning on line 22 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (textlint)
textlint-rule-incremental-headers@^0.2.0 \

Check warning on line 23 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (textlint)
textlint-rule-ja-no-mixed-period@^3.0.1 \
textlint-rule-ja-no-successive-word@^2.0.1 \
textlint-rule-ja-no-weak-phrase@^2.0.0 \
textlint-rule-max-ten@^5.0.0 \
textlint-rule-no-dead-link@^6.0.1 \
textlint-rule-no-double-negative-ja@^2.0.1 \
textlint-rule-no-doubled-conjunction@^3.0.0 \
textlint-rule-no-doubled-conjunctive-particle-ga@^3.0.0 \
textlint-rule-no-doubled-joshi@^5.1.0 \

Check warning on line 32 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (joshi)
textlint-rule-no-dropping-the-ra@^3.0.0 \
textlint-rule-no-hankaku-kana@^2.0.1 \

Check warning on line 34 in .devcontainer/Dockerfile

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (hankaku)
textlint-rule-no-mix-dearu-desumasu@^6.0.4 \
textlint-rule-no-nfd@^2.0.2 \
textlint-rule-preset-ja-spacing@^2.4.3 \
textlint-rule-preset-jtf-style@^3.0.2

# Switch to non-root user
USER vscode

# Set working directory for the container
WORKDIR /workspaces/win
5 changes: 2 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
{
"name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:trixie",
"features": {
"ghcr.io/devcontainer-community/devcontainer-features/deno.com:1": {}
"build": {
"dockerfile": "Dockerfile"
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: devcontainers
directory: "/"
- package-ecosystem: "docker"
directory: "/.devcontainer"
schedule:
interval: "weekly"
13 changes: 4 additions & 9 deletions .github/workflows/textlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,9 @@ jobs:
- name: Setup repo
uses: actions/checkout@v6

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Build Docker image
run: docker build -t textlint-runner .devcontainer

- name: Install dependencies
run: bun install

- name: Run textlint with Bun
- name: Run textlint in Docker
run: |
find posts/${{ matrix.year }} -name '*.md' | sort | xargs -n1 bun x textlint
find posts/${{ matrix.year }} -name '*.md' | sort | xargs docker run --rm -v ${{ github.workspace }}:/workspaces/win textlint-runner textlint
Loading
Loading