Separated build.zsh into 3 clear parts: 1. build.zsh (Arch Linux base construction) - archiso bootstrap - pacstrap base system - install base packages - install Claude Code 2. cfg/setup-user.sh (User setup) - Create ai user - Configure sudoers - Setup auto-login - Configure zshrc and auto-start 3. cfg/setup-claude.sh (Claude/aigpt setup) - Install aigpt - Configure MCP - Setup symlinks - Initialize database Benefits: - Each file has a single, clear responsibility - Easier to maintain and modify - Can skip/customize setup steps if needed - GitHub Actions simplified to just run build.zsh
56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
GITHUB_TOKEN: ${{ secrets.APP_TOKEN }}
|
|
REGISTRY: ghcr.io
|
|
|
|
jobs:
|
|
release:
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: archlinux
|
|
options: --privileged
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build aios
|
|
run: bash ./build.zsh
|
|
|
|
- name: Create Docker images
|
|
run: |
|
|
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
|
|
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
|
|
docker push ${{ env.IMAGE_NAME }}
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ env.GITHUB_TOKEN }}
|
|
- name: github container registry
|
|
run: |
|
|
docker tag ${{ env.IMAGE_NAME }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
|
|
- name: Create new release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
name: latest
|
|
tag_name: latest
|
|
files:
|
|
aios-bootstrap.tar.gz
|
|
|