os/.gitea/workflows/release.yml

40 lines
1.2 KiB
YAML
Raw Normal View History

2024-02-21 13:45:41 +00:00
name: Build and Push Image
on: [ push ]
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 }}
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: prepare release
run: |
mkdir out
2024-03-05 14:14:13 +00:00
curl -sL https://github.com/syui/aios/releases/download/latest/aios-bootstrap.tar.gz -o out/aios-bootstrap.tar.gz
2024-03-05 03:42:20 +00:00
- name: release
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
out/**
api_key: '${{secrets.APP_TOKEN}}'