Compare commits

...

10 Commits

Author SHA1 Message Date
94d16d9a21 add scpt
Some checks failed
build and push image / Release (push) Failing after 13m57s
2025-08-10 07:56:31 +09:00
ccd4aab9af add ai.conf
Some checks failed
build and push image / Release (push) Failing after 2m24s
2025-07-04 11:46:50 +09:00
591c34b61b fix podman
Some checks are pending
build and push image / Release (push) Waiting to run
2025-04-12 03:06:43 +09:00
c3772d1b93 fix actions 2025-04-12 02:51:16 +09:00
d4e96f0282 fix actions 2025-04-12 02:51:16 +09:00
2dc46f5897 fix gh-actions 2025-04-12 02:51:15 +09:00
15a6af27ce add gh-actions cron 2025-02-24 16:55:38 +09:00
65aa20dfe6 fix bc
All checks were successful
build and push image / Release (push) Successful in 3m29s
2025-01-20 16:31:50 +09:00
04b6c5de6c test ge-actions
Some checks failed
build and push image / Release (push) Failing after 1m28s
2024-08-25 13:29:13 +09:00
35a33a7ca6 add bc 2024-08-25 13:07:31 +09:00
10 changed files with 104 additions and 25 deletions

View File

@@ -0,0 +1,6 @@
# https://github.com/containers/shortnames
# ~/.config/containers/registries.conf.d/ai.conf
unqualified-search-registries=["git.syui.ai", "docker.io", "ghcr.io"]
[aliases]
"aios"="git.syui.ai/ai/os"

View File

@@ -2,12 +2,8 @@ name: build and push image
on:
schedule:
- cron: '0 12 * * *'
- cron: '0 0 * * *'
push:
branches:
- main
paths:
- '!README.md'
env:
TAG: latest
@@ -21,14 +17,14 @@ jobs:
name: Release
runs-on: ubuntu-latest
container:
image: syui/aios
image: ghcr.io/syui/aios
options: --privileged
steps:
- name: Initialize
run: |
pacman -Syuu --noconfirm base-devel archiso docker git curl
docker pull syui/aios
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
docker pull ghcr.io/syui/aios
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
echo "${{ env.APP_TOKEN }}" | docker login ${{ env.REGISTRY }} -u syui --password-stdin
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}

View File

@@ -2,8 +2,8 @@ name: release
on:
push:
branches:
- main
tags:
- 'v*'
permissions:
contents: write
@@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v4
- name: Initialize
run: |
pacman -Syuu --noconfirm base-devel archiso docker git nodejs
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
git clone https://gitlab.archlinux.org/archlinux/archiso
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
@@ -41,7 +41,7 @@ jobs:
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'

View File

@@ -53,16 +53,27 @@ $ docker run -it ghcr.io/syui/aios ai
## podman
```sh
if [ ! -d ~/ai/os/.git ];then
mkdir -p ~/ai
git clone https://git.syui.ai/ai/os ~/ai/os
fi
if [ ! -d ~/.config/containers/registries.conf.d ];then
mkdir -p ~/.config/containers/registries.conf.d
fi
ln -s ~/ai/os/.config/containers/registries.conf.d/ai.conf ~/.config/containers/registries.conf.d/ai.conf
```
```sh
$ podman pull aios
```
https://github.com/containers/shortnames
> /etc/containers/registries.conf.d/ai.conf
> ~/.config/containers/registries.conf.d/ai.conf
```sh
unqualified-search-registries = ['docker.io', 'git.syui.ai', 'ghcr.io']
# https://github.com/containers/shortnames
# ~/.config/containers/registries.conf.d/ai.conf
unqualified-search-registries = ['git.syui.ai', 'docker.io', 'ghcr.io']
[aliases]
"aios" = "git.syui.ai/ai/os"
@@ -80,7 +91,20 @@ Copying blob c7e55fecf0be [====================>-----------------] 917.4MiB / 1.
stop
```sh
schedule:
- cron: "0 0 * * *"
```
## update action
```sh
$ vim build.zszh
$ ./scpt/gh-actions.zsh
```
## link
- https://git.syui.ai/ai/os
- https://github.com/syui/aios

View File

@@ -1,5 +1,5 @@
#!/bin/zsh
pacman -Syuu --noconfirm base-devel archiso docker git nodejs
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
git clone https://gitlab.archlinux.org/archlinux/archiso
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
@@ -14,7 +14,7 @@ Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pa
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'

View File

@@ -1,4 +1,6 @@
unqualified-search-registries = ['docker.io', 'git.syui.ai', 'ghcr.io']
# https://github.com/containers/shortnames
# ~/.config/containers/registries.conf.d/ai.conf
unqualified-search-registries = ['git.syui.ai', 'docker.io', 'ghcr.io']
[aliases]
"aios" = "git.syui.ai/ai/os"

View File

@@ -4,8 +4,6 @@ on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
permissions:
contents: write
@@ -28,7 +26,7 @@ jobs:
uses: actions/checkout@v4
- name: Initialize
run: |
pacman -Syuu --noconfirm base-devel archiso docker git nodejs
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
git clone https://gitlab.archlinux.org/archlinux/archiso
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
@@ -43,7 +41,7 @@ jobs:
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman'
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'

View File

@@ -9,8 +9,6 @@ on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
permissions:
contents: write
@@ -69,3 +67,5 @@ echo '#!/bin/zsh' >! $dd/build.zsh
echo $yml_b >> $dd/build.zsh
cat $dd/build.zsh
cp -rf $dd/cfg/gh-actions.yml $dd/.github/workflows/release.yml

9
scpt/img.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
pacman -Syuu --noconfirm git base-devel archiso
git clone https://gitlab.archlinux.org/archlinux/archiso
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
mkdir -p work/x86_64/airootfs/var/lib/machines/arch
pacstrap -c work/x86_64/airootfs/var/lib/machines/arch base
arch-chroot work/x86_64/airootfs/ /bin/sh -c 'pacman-key --init'
arch-chroot work/x86_64/airootfs/ /bin/sh -c 'pacman-key --populate archlinux'
tar -zcvf archlinux.tar.gz -C work/x86_64/airootfs/ .

44
scpt/install.sh Normal file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
set -euo pipefail
# 変数定義
DISK="/dev/sda"
HOSTNAME="ai-arch"
USERNAME="ai"
# パーティション作成(自動)
parted $DISK mklabel gpt
parted $DISK mkpart ESP fat32 1MiB 1GiB
parted $DISK set 1 esp on
parted $DISK mkpart primary linux-swap 1GiB 5GiB
parted $DISK mkpart primary ext4 5GiB 100%
# ファイルシステム作成
mkfs.fat -F32 ${DISK}1
mkswap ${DISK}2
mkfs.ext4 ${DISK}3
# マウント
mount ${DISK}3 /mnt
mkdir -p /mnt/boot
mount ${DISK}1 /mnt/boot
swapon ${DISK}2
# インストール
pacstrap -K /mnt base linux linux-firmware base-devel vim networkmanager grub efibootmgr
# 設定
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt /bin/bash << EOF
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
hwclock --systohc
echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=ja_JP.UTF-8" > /etc/locale.conf
echo "$HOSTNAME" > /etc/hostname
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCH
grub-mkconfig -o /boot/grub/grub.cfg
systemctl enable NetworkManager
useradd -m -G wheel $USERNAME
EOF