Compare commits
No commits in common. "dab6f6dfa286a0bf069881cc84040154302c12eb" and "b90fcbdd0d896e390b7e7c1f8ed6b37c19793340" have entirely different histories.
dab6f6dfa2
...
b90fcbdd0d
41
.github/workflows/release.yml
vendored
41
.github/workflows/release.yml
vendored
@ -1,41 +0,0 @@
|
|||||||
name: release
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
schedule:
|
|
||||||
- cron: '0 0 * * *'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
name: Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: archlinux:latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Initialize
|
|
||||||
env:
|
|
||||||
DOCKER_USER: ${{ secrets.DOCKER_USER }}
|
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
pacman -Syuu --noconfirm base-devel archiso docker
|
|
||||||
./build.zsh gh
|
|
||||||
mv *.tar.gz ./aios-bootstrap.tar.gz
|
|
||||||
systemctl start docker
|
|
||||||
docker login -u=$DOCKER_USER -p=$DOCKER_PASSWORD
|
|
||||||
tar -C ./root.x86_64 -c . | docker import - syui/aios
|
|
||||||
docker push syui/aios
|
|
||||||
- name: Create new release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
name: Release latest
|
|
||||||
tag_name: latest
|
|
||||||
files:
|
|
||||||
aios-bootstrap.tar.gz
|
|
@ -57,3 +57,4 @@ $ docker run --rm syui/aios cargo version
|
|||||||
cargo 1.75.0
|
cargo 1.75.0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
20
build.zsh
20
build.zsh
@ -4,15 +4,9 @@ d=${0:a:h}
|
|||||||
case $1 in
|
case $1 in
|
||||||
bsae)
|
bsae)
|
||||||
a=baseline
|
a=baseline
|
||||||
docker=true
|
|
||||||
;;
|
|
||||||
gh)
|
|
||||||
a=releng
|
|
||||||
docker=false
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
a=releng
|
a=releng
|
||||||
docker=true
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -55,11 +49,11 @@ arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linu
|
|||||||
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'
|
||||||
|
|
||||||
# docker image
|
# docker image
|
||||||
if [ $docker = true ];then
|
systemctl start docker
|
||||||
systemctl start docker
|
tar -C $d/root.x86_64 -c . | docker import - syui/aios
|
||||||
tar -C $d/root.x86_64 -c . | docker import - syui/aios
|
|
||||||
|
|
||||||
docker images -a
|
docker images -a
|
||||||
docker run --rm syui/aios ai
|
docker run --rm syui/aios ai
|
||||||
docker push syui/aios
|
docker push syui/aios
|
||||||
fi
|
|
||||||
|
# docker run -it syui/aios zsh
|
||||||
|
Loading…
Reference in New Issue
Block a user