[] [ci] Add forgejo CI prototype

This commit is contained in:
Sebastian Schulze 2024-04-12 01:09:32 +02:00
parent 0b8873d0f8
commit 8c94b839aa
Signed by: bascht
GPG key ID: 5BCB1D3B4D38A35A
3 changed files with 60 additions and 3 deletions

View file

@ -0,0 +1,40 @@
---
on: [push]
jobs:
doom:
runs-on: docker
container:
image: alpine:3.19
needs: [clone]
steps:
- run: grep Alpine /etc/os-release
- run: |
apk add --update git emacs-nox chezmoi nodejs bash mu mu4e tar zstd
with:
entrypoint: "/bin/sh"
- uses: actions/checkout@v3
- run: |
mkdir -p "${HOME}/.local/share" "${HOME}/.config/chezmoi"
ln -s "$(pwd)" "${HOME}/.local/share/chezmoi"
cp "$(pwd)/bootstrap/chezmoi.toml" "${HOME}/.config/chezmoi"
- run: |
chezmoi apply
- name: Restore cached Doom
id: cache-doom-restore
uses: actions/cache/restore@v4
with:
path: |
/root/.emacs.d
key: ${{ runner.os }}-doom
- run: |
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d || (cd ~/.emacs.d && git pull)
- run: |
~/.emacs.d/bin/doom profiles sync --force
~/.emacs.d/bin/doom sync --force
- name: Save Doom Cache
id: cache-doom-save
uses: actions/cache/save@v4
with:
path: |
/root/.emacs.d
key: ${{ steps.cache-doom-restore.outputs.cache-primary-key }}

View file

@ -14,10 +14,11 @@ case "${FIRST_FILE}" in
.githooks/*|README.org)
PREFIX="meta"
;;
.forgejo/*)
PREFIX="ci"
;;
*)
PREFIX=""
esac
if [[ -n "${PREFIX}" ]]; then
sed -i "1s/^/[${PREFIX}] /" "${COMMIT_MSG_FILE}"
fi;
sed -i "1s/^/[${PREFIX}] /" "${COMMIT_MSG_FILE}"

16
bootstrap/chezmoi.toml Normal file
View file

@ -0,0 +1,16 @@
[data.me]
name = "Sebastian Schulze"
email = "this-is-a-bootstrapped-system@bascht.space"
[data.gpg]
default_key = "0x08B8010450B2C877"
[data.git]
email = "this-is-a-bootstrapped-system@bascht.spacem"
signingkey = "this-is-a-bootstrapped-system@bascht.spacem"
forges = ["github.com", "gitlab.com", "git.bascht.space", "git.sr.ht"]
[[data.bookmarks]]
name = "sr-ht"
url = "https://todo.sr.ht/~bascht/"