This commit is contained in:
@@ -19,18 +19,10 @@ jobs:
|
|||||||
image: ghcr.io/syui/aios
|
image: ghcr.io/syui/aios
|
||||||
options: --privileged
|
options: --privileged
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Pull and push to local registry
|
||||||
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: |
|
run: |
|
||||||
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
|
pacman -Sy --noconfirm docker
|
||||||
docker tag ${{ env.IMAGE_NAME }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
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
|
echo "${{ env.APP_TOKEN }}" | docker login ${{ env.REGISTRY }} -u syui --password-stdin
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
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:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: archlinux
|
|
||||||
options: --privileged
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install build dependencies
|
|
||||||
run: pacman -Sy --noconfirm arch-install-scripts zsh docker
|
|
||||||
|
|
||||||
- name: Build aios
|
- 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
|
- name: Push to GitHub Container Registry
|
||||||
run: |
|
run: |
|
||||||
@@ -36,11 +34,10 @@ jobs:
|
|||||||
docker push ghcr.io/syui/aios
|
docker push ghcr.io/syui/aios
|
||||||
|
|
||||||
- name: Create new release
|
- name: Create new release
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ env.APP_TOKEN }}
|
GH_TOKEN: ${{ env.APP_TOKEN }}
|
||||||
with:
|
run: |
|
||||||
name: latest
|
gh release delete latest --yes --cleanup-tag || true
|
||||||
tag_name: latest
|
git tag -f latest
|
||||||
files:
|
git push -f origin latest
|
||||||
aios.tar.gz
|
gh release create latest aios.tar.gz --title "latest" --notes "build $(date +%Y.%m.%d)"
|
||||||
|
|||||||
Reference in New Issue
Block a user