Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for GitHub pages v232 #14

Closed
wants to merge 8 commits into from
Closed
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
name: "Build and Release"
strategy:
matrix:
VERSIONS: [ {ruby: 2.7.3, ghpages: 226}, {ruby: 2.7.4, ghpages: 228}]
NODE_MAJOR_VERSION: [16,18,20]
VERSIONS: [ {ruby: 2.7.3, bundler: 2.4.22, ghpages: 226}, {ruby: 2.7.4, bundler: 2.4.22, ghpages: 231}, {ruby: 3.3.4, bundler: 2.5.23, ghpages: 232}]
NODE_MAJOR_VERSION: [20,21,22]
runs-on: ubuntu-latest
env:
RUBY_VERSION: ${{ matrix.VERSIONS.ruby }}
BUNDLER_VERSION: ${{ matrix.VERSIONS.bundler }}
NODE_MAJOR_VERSION: ${{ matrix.NODE_MAJOR_VERSION }}
GITHUB_PAGES_VERSION: ${{ matrix.VERSIONS.ghpages }}

Expand All @@ -29,7 +30,7 @@ jobs:
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${REGISTRY}/${IMAGE_NAME}:ruby${RUBY_VERSION}-node${NODE_MAJOR_VERSION} --build-arg RUBY_VERSION=${RUBY_VERSION} --build-arg NODE_MAJOR_VERSION=${NODE_MAJOR_VERSION} --build-arg BUILD_DATE=$(date -u +%Y-%m-%d_%H-%M-%S) --build-arg VCS_REF=${GITHUB_SHA} --build-arg GH_PAGES_VERSION=${GITHUB_PAGES_VERSION} --progress=plain
run: docker build . --file Dockerfile --tag ${REGISTRY}/${IMAGE_NAME}:ruby${RUBY_VERSION}-node${NODE_MAJOR_VERSION} --build-arg RUBY_VERSION=${RUBY_VERSION} --build-arg BUNDLER_VERSION=${BUNDLER_VERSION} --build-arg NODE_MAJOR_VERSION=${NODE_MAJOR_VERSION} --build-arg BUILD_DATE=$(date -u +%Y-%m-%d_%H-%M-%S) --build-arg VCS_REF=${GITHUB_SHA} --build-arg GH_PAGES_VERSION=${GITHUB_PAGES_VERSION} --progress=plain
- name: Inspect the built image
run: docker inspect ${REGISTRY}/${IMAGE_NAME}:ruby${RUBY_VERSION}-node${NODE_MAJOR_VERSION}
- name: Login to registry (non-PR only)
Expand Down
25 changes: 14 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Adapted from https://github.com/timbru31/docker-ruby-node/blob/master/2.7/16/Dockerfile
# Using dependency references from https://pages.github.com/versions/

# 2.7.4 is GitHub Pages 228 compatible
ARG RUBY_VERSION=2.7.4
# 3.3.4 is GitHub Pages 232 compatible
ARG RUBY_VERSION=3.3.4

FROM ruby:${RUBY_VERSION}

# NOTE: These args need to stay below the FROM line in order for Docker to recognize them.
ARG BUILD_DATE
ARG VCS_REF
ARG GH_PAGES_VERSION=228
ARG NODE_MAJOR_VERSION=18
ARG GH_PAGES_VERSION=232
ARG NODE_MAJOR_VERSION=22
ARG BUNDLER_VERSION=2.5.23

RUN echo "RUBY_VERSION=${RUBY_VERSION}"
RUN echo "BUNDLER_VERSION=${BUNDLER_VERSION}"
RUN echo "BUILD_DATE=${BUILD_DATE}"
RUN echo "VCS_REF=${VCS_REF}"
RUN echo "GH_PAGES_VERSION=${GH_PAGES_VERSION}"
Expand All @@ -22,13 +24,13 @@ RUN echo "NODE_MAJOR_VERSION=${NODE_MAJOR_VERSION}"
LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.title="Blog-in-a-box Container"
LABEL org.opencontainers.image.description="The container used by blog-in-a-box. Ruby, node, jekyll, and necessary packages."
LABEL org.opencontainers.image.url="https://github.com/excellalabs/blog-in-a-box-container"
LABEL org.opencontainers.image.documentation="https://github.com/excellalabs/blog-in-a-box-container"
LABEL org.opencontainers.image.source="https://github.com/excellalabs/blog-in-a-box"
LABEL org.opencontainers.image.url="https://github.com/SeanKilleen/blog-in-a-box-container"
LABEL org.opencontainers.image.documentation="https://github.com/SeanKilleen/blog-in-a-box-container"
LABEL org.opencontainers.image.source="https://github.com/SeanKilleen/blog-in-a-box-container"
LABEL org.opencontainers.image.revision="${VCS_REF}"
LABEL org.opencontainers.image.vendor="Excella"
LABEL org.opencontainers.image.vendor="Sean Killeen"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.authors="Sean Killeen <sean.killeen@excella.com>"
LABEL org.opencontainers.image.authors="Sean Killeen <SeanKilleen@gmail.com>"

LABEL ruby_version="${RUBY_VERSION}"
LABEL gh_pages_version="${GH_PAGES_VERSION}"
Expand All @@ -48,7 +50,7 @@ RUN apt-get -y install \
tzdata \
dos2unix

RUN gem install bundler
RUN gem install bundler -v ${BUNDLER_VERSION}

#################################################################
# Installing node #
Expand All @@ -66,5 +68,6 @@ RUN curl -sL https://deb.nodesource.com/setup_${NODE_MAJOR_VERSION}.x | bash -\
RUN node -v
RUN npm -v
RUN npm install -g cspell markdownlint-cli
RUN npm install -g markdownlint-cli2

EXPOSE 4000
EXPOSE 4000
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ We try to keep it up to date with [the GitHub Pages dependencies](https://pages.
* Ruby, at the specified version (currently publish with 2.7.3 to match GitHub pages preferred version)
* Git, tzdata updates, and the latest `bundler` gem at the time of build
* Node at the specified major version (currently 16.x)
* the `cSpell` and `markdownlint-cli` npm packages globally installed
* the following npm packages globally installed:
* `cSpell`
* `markdownlint-cli`
* `markdownlint-cli2`
* Port 4000 exposed, as this is what Jekyll publishes on.

## Get Involved
Expand Down
Loading