From 605d3ce31c53a3705f36a20cba187930ec3a4ebc Mon Sep 17 00:00:00 2001 From: brooke Date: Tue, 4 Jun 2024 16:15:54 -0400 Subject: [PATCH] bump - hugo-version: ["0.126.3"] node-version: ["22"] go-version: ["1.22.3"] --- .github/workflows/build.yml | 97 +++++-------------------------------- Dockerfile | 10 ++-- 2 files changed, 17 insertions(+), 90 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbf5867..385e10e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,52 +3,17 @@ name: Build And Publish Docker on: push: branches: - - "master" + - "main" jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: - hugo-version: - [ - #"0.112.6", - "0.112.7", - "0.113.0", - #"0.114.0", - "0.114.1", - #"0.115.0", - #"0.115.1", - #"0.115.2", - #"0.115.3", - "0.115.4", - #"0.116.0", - "0.116.1", - "0.117.0", - #"0.118.0", - #"0.118.1", - "0.118.2", - "0.119.0", - #"0.120.1", - #"0.120.2", - #"0.120.3", - "0.120.4", - #"0.121.0", - "0.121.1" - ] - node-version: ["18", "20", "21"] - go-version: - [ - "1", - "1.19", - #"1.19.11", - "1.20", - #"1.20.5", - #"1.20.6", - "1.21", - "1.21.5" - ] + hugo-version: ["0.126.3"] + node-version: ["22"] + go-version: ["1.22.3"] steps: - uses: actions/checkout@v3 @@ -62,62 +27,24 @@ jobs: id: buildx uses: docker/setup-buildx-action@master - - name: Login to DockerHub - if: github.event_name != 'pull_request' + - name: Login to Self-Hosted Registry uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} + registry: git.myco.systems + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - - name: Build + - name: Build and Push Extended Version uses: docker/build-push-action@v4 with: builder: ${{ steps.buildx.outputs.name }} context: ./ file: ./Dockerfile - platforms: linux/amd64 # ,linux/arm64/v8 + platforms: linux/amd64 push: true build-args: | HUGO_VERSION=${{ matrix.hugo-version }} NODE_VERSION=${{ matrix.node-version }} GO_VERSION=${{ matrix.go-version }} tags: | - "betterweb/hugo:extended-${{ matrix.hugo-version }}-${{ matrix.node-version }}-${{ matrix.go-version }}" - - build-latest: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set up QEMU - uses: docker/setup-qemu-action@master - with: - platforms: all - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - - - name: Build - uses: docker/build-push-action@v4 - with: - builder: ${{ steps.buildx.outputs.name }} - context: ./ - file: ./Dockerfile - platforms: linux/amd64 # ,linux/arm64/v8 - push: true - build-args: | - HUGO_VERSION=0.115.4 - NODE_VERSION=18 - GO_VERSION=1.20 - tags: | - betterweb/hugo:latest - betterweb/hugo:extended-latest + git.myco.systems/mycosystems/hugo-ci:extended-${{ matrix.hugo-version \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 14a6feb..56c55b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ -ARG GO_VERSION="1.21" +ARG GO_VERSION="1.22.3" FROM golang:${GO_VERSION}-bullseye -ARG HUGO_VERSION="0.121.1" -ARG NODE_VERSION="18" +ARG HUGO_VERSION="0.126.3" +ARG NODE_VERSION="22" RUN apt update -y RUN apt install tar gzip build-essential ca-certificates curl gnupg -y RUN mkdir -p /etc/apt/keyrings RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/setup_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list RUN apt update -y && apt-get install -y nodejs RUN npm i -g yarn pnpm RUN mkdir /tmp/temph @@ -21,4 +21,4 @@ WORKDIR /home/app # Cleanup RUN rm -rfv /tmp/temph -ENTRYPOINT [ "/bin/bash" ] +ENTRYPOINT [ "/bin/bash" ] \ No newline at end of file