This repository has been archived on 2026-03-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
test-ci/.gitea/workflows/ci.yml
gqt 9e1d233926
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m39s
ci: add timestamp tag, remove repo link step
2026-02-08 13:23:50 +08:00

29 lines
761 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 Docker Image
run: |
TAG=$(date +%Y%m%d%H%M%S)
docker build \
-t gitea.chatgqt.top/gqt/test-ci:latest \
-t gitea.chatgqt.top/gqt/test-ci:$TAG .
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Push Docker Image
run: |
docker push gitea.chatgqt.top/gqt/test-ci:latest
docker push gitea.chatgqt.top/gqt/test-ci:$TAG