Compare commits

..
Author SHA1 Message Date
renovate-bot 595b10a9cd Update hugomods/hugo Docker tag to v0.163.2 2026-06-16 00:03:10 +00:00
2 changed files with 26 additions and 27 deletions
+21 -24
View File
@@ -6,38 +6,35 @@ on:
- main - main
jobs: jobs:
# No space in the job id: it is interpolated verbatim into the podman network build docker:
# name, and podman rejects [a-zA-Z0-9][a-zA-Z0-9_.-]* violations that docker let through. runs-on: linux_amd
build-docker:
runs-on: ubuntu-latest
env:
IMAGE: git.d3vyce.fr/${{ github.repository }}:latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v7 uses: actions/checkout@v4
# actions/checkout#1830
# with: # with:
# lfs: 'true' # lfs: 'true'
- name: Checkout LFS - name: Checkout LFS
run: | run: |
function EscapeForwardSlash() { echo "$1" | sed 's/\//\\\//g'; } function EscapeForwardSlash() { echo "$1" | sed 's/\//\\\//g'; }
readonly ReplaceStr="EscapeForwardSlash ${{ gitea.repository }}.git/info/lfs/objects/batch"; sed -i "s/\(\[http\)\( \".*\)\"\]/\1\2`$ReplaceStr`\"]/" .git/config readonly ReplaceStr="EscapeForwardSlash ${{ gitea.repository }}.git/info/lfs/objects/batch"; sed -i "s/\(\[http\)\( \".*\)\"\]/\1\2`$ReplaceStr`\"]/" .git/config
git config --local lfs.transfer.maxretries 1
/usr/bin/git lfs fetch origin refs/remotes/origin/${{ gitea.ref_name }} /usr/bin/git lfs fetch origin refs/remotes/origin/${{ gitea.ref_name }}
/usr/bin/git lfs checkout /usr/bin/git lfs checkout
- name: Verify LFS objects resolved - name: Set up QEMU
run: | uses: docker/setup-qemu-action@v3
# A failed fetch leaves pointer files behind and hugo only dies later on - name: Set up Docker Buildx
# .Resize with "image: unknown format". Fail here, where the cause is legible. uses: docker/setup-buildx-action@v3
if git lfs ls-files | awk '$2 == "-"' | grep -q .; then - name: Login to Docker registry
echo "::error::LFS objects missing - these are still pointer files:" uses: docker/login-action@v3
git lfs ls-files | awk '$2 == "-" { print " " $3 }' with:
exit 1 registry: git.d3vyce.fr
fi username: ${{ github.actor }}
- name: Install buildah password: ${{ secrets.GIT_TOKEN }}
run: |
apt-get update && apt-get install -y buildah
- name: Build and push - name: Build and push
run: | uses: docker/build-push-action@v6
buildah login -u "${{ github.actor }}" -p "${{ secrets.GIT_TOKEN }}" git.d3vyce.fr with:
buildah --storage-driver vfs build --isolation chroot -t "$IMAGE" -f ./Dockerfile . context: .
buildah --storage-driver vfs push "$IMAGE" file: ./Dockerfile
platforms: linux/amd64
push: true
tags: git.d3vyce.fr/${{ github.repository }}:latest
+5 -3
View File
@@ -1,15 +1,17 @@
# Build Stage # Build Stage
FROM docker.io/hugomods/hugo:0.165.0 AS build FROM hugomods/hugo:0.163.2 AS build
ARG BLOWFISH_VERSION
WORKDIR /opt/blog WORKDIR /opt/blog
COPY . /opt/blog/ COPY . /opt/blog/
RUN git submodule update --init --recursive && \ RUN git submodule update --init --recursive && \
git -C themes/blowfish/ checkout v2.105.0 git -C themes/blowfish/ checkout v2.103.0
RUN hugo RUN hugo
# Publish Stage # Publish Stage
FROM docker.io/nginx:1.31-alpine FROM nginx:1.31-alpine
WORKDIR /usr/share/nginx/html WORKDIR /usr/share/nginx/html
COPY --from=build /opt/blog/public /usr/share/nginx/html/ COPY --from=build /opt/blog/public /usr/share/nginx/html/