35 lines
952 B
YAML
35 lines
952 B
YAML
name: Build and Push Image
|
|
on: [ push ]
|
|
|
|
env:
|
|
USERNAME: ai
|
|
IMAGE_NAME: ${{ gitea.repository }}
|
|
APP_TOKEN: ${{ secrets.APP_TOKEN }}
|
|
REGISTRY: localhost:8088
|
|
|
|
jobs:
|
|
release:
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: archlinux
|
|
options: --privileged
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Initialize
|
|
run: |
|
|
pacman -Syuu --noconfirm base-devel archiso docker git
|
|
docker pull syui/aios
|
|
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: syui
|
|
password: ${{ env.APP_TOKEN }}
|
|
- name: github container registry
|
|
run: |
|
|
docker push ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}:latest
|