25 lines
700 B
YAML
25 lines
700 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea Registry
|
|
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login gitea.chatgqt.top -u ${{ gitea.actor }} --password-stdin
|
|
|
|
- name: Build and Push
|
|
run: |
|
|
docker buildx create --use --name gitea-builder 2>/dev/null || true
|
|
docker buildx build --push \
|
|
--provenance=false \
|
|
--tag gitea.chatgqt.top/gqt/test-ci:latest \
|
|
--label "org.opencontainers.image.source=https://gitea.chatgqt.top/gqt/test-ci" \
|
|
.
|