add gitea actions
Some checks failed
Build and Push Image / Release (push) Failing after 4m11s

This commit is contained in:
2024-03-05 12:42:20 +09:00
parent 296e9b2f29
commit e4492680bb
5 changed files with 30 additions and 23 deletions

View File

@ -2,8 +2,8 @@ name: Build and Push Image
on: [ push ]
env:
USERNAME: ai
TAG: latest
IMAGE_ID: aios
IMAGE_NAME: ${{ gitea.repository }}
APP_TOKEN: ${{ secrets.APP_TOKEN }}
REGISTRY: localhost:8088
@ -13,13 +13,28 @@ jobs:
name: Release
runs-on: ubuntu-latest
container:
image: archlinux
image: syui/aios
options: --privileged
steps:
- name: Initialize
run: |
pacman -Syuu --noconfirm base-devel archiso docker git
pacman -Syuu --noconfirm base-devel archiso docker git curl
docker pull syui/aios
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}:latest
docker tag 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.USERNAME }}/${{ env.IMAGE_NAME }}:latest
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: prepare release
run: |
mkdir out
cd out
curl -sLO https://github.com/syui/aios/releases/download/latest/aios-bootstrap.tar.gz
- name: release
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
out/**
api_key: '${{secrets.APP_TOKEN}}'