From aba868b0481b281887c5d9666b94be332e682f5a Mon Sep 17 00:00:00 2001 From: syui Date: Fri, 27 Feb 2026 18:49:19 +0900 Subject: [PATCH] fix gitea --- .gitea/workflows/release.yml | 16 ++++------------ .github/workflows/release.yml | 25 +++++++++++-------------- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index dd006aa..32e89de 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -19,18 +19,10 @@ jobs: image: ghcr.io/syui/aios options: --privileged steps: - - 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 + - name: Pull and push to local registry run: | - tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }} - docker tag ${{ env.IMAGE_NAME }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} + pacman -Sy --noconfirm docker + docker pull ghcr.io/syui/aios + docker tag ghcr.io/syui/aios ${{ 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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36974dd..e9d0fbf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,18 +15,16 @@ jobs: release: name: Release runs-on: ubuntu-latest - container: - image: archlinux - options: --privileged steps: - 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 + run: | + docker run --rm --privileged \ + -v ${{ github.workspace }}:/work -w /work \ + archlinux:latest \ + bash -c "pacman -Sy --noconfirm arch-install-scripts zsh && zsh ./build.zsh" - name: Push to GitHub Container Registry run: | @@ -36,11 +34,10 @@ jobs: docker push ghcr.io/syui/aios - name: Create new release - uses: softprops/action-gh-release@v1 env: - GITHUB_TOKEN: ${{ env.APP_TOKEN }} - with: - name: latest - tag_name: latest - files: - aios.tar.gz + GH_TOKEN: ${{ env.APP_TOKEN }} + run: | + gh release delete latest --yes --cleanup-tag || true + git tag -f latest + git push -f origin latest + gh release create latest aios.tar.gz --title "latest" --notes "build $(date +%Y.%m.%d)"