diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 852f7ec..782a789 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,4 +1,4 @@ -name: build and push image +name: release on: schedule: @@ -7,7 +7,6 @@ on: env: TAG: latest - IMAGE_ID: aios IMAGE_NAME: ${{ gitea.repository }} APP_TOKEN: ${{ secrets.APP_TOKEN }} REGISTRY: localhost:8088 @@ -17,13 +16,21 @@ jobs: name: Release runs-on: ubuntu-latest container: - image: ghcr.io/syui/aios + image: archlinux options: --privileged steps: - - name: Pull and re-tag image + - name: Checkout + uses: actions/checkout@v4 + + - name: Install build dependencies + run: pacman -Sy --noconfirm arch-install-scripts zsh docker + + - name: Build aios + run: zsh ./build.zsh + + - name: Push to local registry run: | - pacman -Sy --noconfirm docker - docker pull ghcr.io/syui/aios - docker tag ghcr.io/syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} + tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }} + docker tag ${{ env.IMAGE_NAME }} ${{ 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 }}