This commit is contained in:
parent
da81af59ce
commit
da0022b662
@ -2,9 +2,10 @@ name: Build and Push Image
|
|||||||
on: [ push ]
|
on: [ push ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
USERNAME: ai
|
||||||
IMAGE_NAME: ${{ gitea.repository }}
|
IMAGE_NAME: ${{ gitea.repository }}
|
||||||
GITHUB_TOKEN: ${{ secrets.APP_TOKEN }}
|
APP_TOKEN: ${{ secrets.APP_TOKEN }}
|
||||||
REGISTRY: git.syui.ai
|
REGISTRY: localhost:8088
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@ -37,15 +38,15 @@ jobs:
|
|||||||
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/
|
||||||
tar -C ./root.x86_64 -c . | docker import - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
tar -C ./root.x86_64 -c . | docker import - ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ gitea.actor }}
|
username: syui
|
||||||
password: ${{ env.GITHUB_TOKEN }}
|
password: ${{ env.APP_TOKEN }}
|
||||||
- name: github container registry
|
- name: github container registry
|
||||||
run: |
|
run: |
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
docker push ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user