40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Build and Push Image
|
|
on: [ push ]
|
|
|
|
env:
|
|
TAG: latest
|
|
IMAGE_ID: aios
|
|
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: Initialize
|
|
run: |
|
|
docker pull syui/aios
|
|
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.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}}'
|