2024-03-05 18:02:03 +00:00
|
|
|
name: build and push image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- '!README.md'
|
2024-02-21 13:45:41 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
TAG: latest
|
2024-03-05 03:42:20 +00:00
|
|
|
IMAGE_ID: aios
|
2024-02-21 13:45:41 +00:00
|
|
|
IMAGE_NAME: ${{ gitea.repository }}
|
|
|
|
APP_TOKEN: ${{ secrets.APP_TOKEN }}
|
|
|
|
REGISTRY: localhost:8088
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
2024-03-05 03:42:20 +00:00
|
|
|
image: syui/aios
|
2024-02-21 13:45:41 +00:00
|
|
|
options: --privileged
|
|
|
|
steps:
|
|
|
|
- name: Initialize
|
|
|
|
run: |
|
2024-03-05 03:42:20 +00:00
|
|
|
pacman -Syuu --noconfirm base-devel archiso docker git curl
|
2024-02-21 13:45:41 +00:00
|
|
|
docker pull syui/aios
|
2024-03-05 03:42:20 +00:00
|
|
|
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
2024-02-21 13:45:41 +00:00
|
|
|
echo "${{ env.APP_TOKEN }}" | docker login ${{ env.REGISTRY }} -u syui --password-stdin
|
2024-03-05 03:42:20 +00:00
|
|
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
|
|
|
|