This commit is contained in:
parent
296e9b2f29
commit
349bca4c23
@ -2,8 +2,8 @@ name: Build and Push Image
|
|||||||
on: [ push ]
|
on: [ push ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
USERNAME: ai
|
|
||||||
TAG: latest
|
TAG: latest
|
||||||
|
IMAGE_ID: aios
|
||||||
IMAGE_NAME: ${{ gitea.repository }}
|
IMAGE_NAME: ${{ gitea.repository }}
|
||||||
APP_TOKEN: ${{ secrets.APP_TOKEN }}
|
APP_TOKEN: ${{ secrets.APP_TOKEN }}
|
||||||
REGISTRY: localhost:8088
|
REGISTRY: localhost:8088
|
||||||
@ -13,13 +13,27 @@ jobs:
|
|||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: archlinux
|
image: archlinux
|
||||||
options: --privileged
|
options: --privileged
|
||||||
steps:
|
steps:
|
||||||
- name: Initialize
|
- name: Initialize
|
||||||
run: |
|
run: |
|
||||||
pacman -Syuu --noconfirm base-devel archiso docker git
|
|
||||||
docker pull syui/aios
|
docker pull syui/aios
|
||||||
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||||
echo "${{ env.APP_TOKEN }}" | docker login ${{ env.REGISTRY }} -u syui --password-stdin
|
echo "${{ env.APP_TOKEN }}" | docker login ${{ env.REGISTRY }} -u syui --password-stdin
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||||
|
- uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: 'stable'
|
||||||
|
- name: prepare release
|
||||||
|
run: |
|
||||||
|
mkdir out
|
||||||
|
cd out
|
||||||
|
curl -sLO https://github.com/syui/aios/releases/download/latest/aios-bootstrap.tar.gz
|
||||||
|
- name: release
|
||||||
|
id: use-go-action
|
||||||
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
out/**
|
||||||
|
api_key: '${{secrets.APP_TOKEN}}'
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -43,7 +43,7 @@ jobs:
|
|||||||
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
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 --init'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
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'
|
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'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
|
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
|
||||||
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
||||||
|
22
README.md
22
README.md
@ -6,28 +6,20 @@
|
|||||||
- image : [aios-bootstrap.tar.gz](https://github.com/syui/aios/releases/tag/latest)
|
- image : [aios-bootstrap.tar.gz](https://github.com/syui/aios/releases/tag/latest)
|
||||||
- base : [archlinux](https://gitlab.archlinux.org/archlinux)
|
- base : [archlinux](https://gitlab.archlinux.org/archlinux)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ docker run -it git.syui.ai/ai/os ai
|
||||||
|
```
|
||||||
|
|
||||||
### docker
|
### docker
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ docker run -it syui/aios ai
|
# https://hub.docker.com/r/syui/aios
|
||||||
```
|
$ docekr run -it syui/aios ai
|
||||||
|
|
||||||
> Dockerfile
|
# https://github.com/users/syui/packages/container/package/aios
|
||||||
|
|
||||||
```sh
|
|
||||||
FROM syui/aios
|
|
||||||
```
|
|
||||||
|
|
||||||
- https://hub.docker.com/r/syui/aios
|
|
||||||
|
|
||||||
### github
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ docker run -it ghcr.io/syui/aios ai
|
$ docker run -it ghcr.io/syui/aios ai
|
||||||
```
|
```
|
||||||
|
|
||||||
- https://github.com/users/syui/packages/container/package/aios
|
|
||||||
|
|
||||||
### link
|
### link
|
||||||
|
|
||||||
- https://git.syui.ai/ai/os
|
- https://git.syui.ai/ai/os
|
||||||
|
@ -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
|
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 --init'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
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'
|
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'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
|
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
|
||||||
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
||||||
|
@ -43,7 +43,7 @@ jobs:
|
|||||||
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
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 --init'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
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'
|
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'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
|
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
|
||||||
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
||||||
|
Loading…
Reference in New Issue
Block a user