This commit is contained in:
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
@@ -7,13 +7,9 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
packages: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
APP_TOKEN: ${{ secrets.APP_TOKEN }}
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.APP_TOKEN }}
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
@@ -27,31 +23,22 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: pacman -Sy --noconfirm arch-install-scripts zsh
|
run: pacman -Sy --noconfirm arch-install-scripts zsh docker
|
||||||
|
|
||||||
- name: Build aios
|
- name: Build aios
|
||||||
run: zsh ./build.zsh
|
run: zsh ./build.zsh
|
||||||
|
|
||||||
- name: Create Docker images
|
|
||||||
run: |
|
|
||||||
tar -C ./root.x86_64 -c . | docker import - ${{ env.IMAGE_NAME }}
|
|
||||||
echo "${{ env.DOCKER_TOKEN }}" | docker login -u syui --password-stdin
|
|
||||||
docker push ${{ env.IMAGE_NAME }}
|
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ env.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Push to GitHub Container Registry
|
- name: Push to GitHub Container Registry
|
||||||
run: |
|
run: |
|
||||||
docker tag ${{ env.IMAGE_NAME }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
tar -C ./root.x86_64 -c . | docker import - syui/aios
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
echo "${{ env.APP_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
|
docker tag syui/aios ghcr.io/syui/aios
|
||||||
|
docker push ghcr.io/syui/aios
|
||||||
|
|
||||||
- name: Create new release
|
- name: Create new release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ env.APP_TOKEN }}
|
||||||
with:
|
with:
|
||||||
name: latest
|
name: latest
|
||||||
tag_name: latest
|
tag_name: latest
|
||||||
|
|||||||
Reference in New Issue
Block a user