CI: build and use specific container image

This commit is contained in:
Xiretza 2025-02-18 18:05:24 +00:00
parent a6788f3083
commit abed95a670
3 changed files with 25 additions and 7 deletions

View file

@ -0,0 +1,6 @@
# Containerfile for CI build container
FROM archlinux:base-devel
RUN pacman -Sy --noconfirm archlinux-keyring && pacman -Syu --noconfirm nodejs git openssh hugo go git-lfs rsync just markdownlint-cli2 clang
RUN git lfs install

View file

@ -0,0 +1,18 @@
on:
workflow_dispatch:
schedule:
cron: "0 17 * * 2" # every monday evening
jobs:
build_and_push:
name: Build and push container
runs-on: archlinux
steps:
- name: Login to registry
run: echo ${{ secrets.CONTAINER_REGISTRY_PASS }} | docker login -u ${{ vars.CONTAINER_REGISTRY_USER }} --password-stdin git.it-syndikat.org
- name: Build and push
uses: docker/build-push-action@v6
with:
file: .forgejo/Containerfile.build
push: true
tags: ${{ vars.BUILDER_CONTAINER_NAME }}

View file

@ -5,16 +5,10 @@ jobs:
build:
runs-on: docker
container:
image: archlinux:base-devel
image: ${{ vars.BUILDER_CONTAINER_NAME }}
env:
HUGO_CACHEDIR: /tmp/hugo_cache
steps:
- name: Prepare container
run: |
pacman -Sy --noconfirm archlinux-keyring
pacman -Syu --noconfirm
pacman -S --noconfirm nodejs git make pacman-contrib base base-devel openssh wget curl procps-ng bash hugo go git-lfs rsync just markdownlint-cli2 clang
git lfs install
- name: Checkout
uses: actions/checkout@v4
with: