This commit is contained in:
@@ -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 }}
|
||||
|
||||
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user