1 Commits

Author SHA1 Message Date
090253a752 feat: 0.1.2
All checks were successful
/ build ushare (push) Successful in 4s
/ clean (push) Successful in 0s
1. login page && auth required
  2. file dir cleanup
2025-05-12 09:35:53 +08:00
2 changed files with 25 additions and 12 deletions

View File

@ -5,7 +5,7 @@ on:
- 'v*' - 'v*'
jobs: jobs:
build and run u-api: build ushare:
runs-on: tencent-sg runs-on: tencent-sg
steps: steps:
- name: prepare enviroment - name: prepare enviroment
@ -17,9 +17,6 @@ jobs:
- name: print operator - name: print operator
run: whoami run: whoami
- name: print work dir and files
run: pwd & ls -alsh .
- name: print tag name - name: print tag name
run: echo "Tag name = ${{ gitea.ref_name }}" run: echo "Tag name = ${{ gitea.ref_name }}"
@ -29,13 +26,29 @@ jobs:
${{ secrets.DOCKER_CONFIG }} ${{ secrets.DOCKER_CONFIG }}
EOF EOF
- name: build by kaniko in docker - name: print work dir and files
run: | run: pwd & ls -alsh .
docker run --rm -v $(pwd):/workspace \
-v $(pwd)/.docker.config.json:/kaniko/.docker/config.json:ro \ - name: build image by docker build
gcr.io/kaniko-project/executor:latest \ run: docker build -t gitea.loveuer.com/loveuer/build/ushare:${{ gitea.ref_name }} .
'-d "gitea.loveuer.com/loveuer/build/ushare:${{ gitea.ref_name }}"' \
'--single-snapshot' - name: login repository
run: echo ${{ secrets.DOCKER_REPOSITORY_PASSWORD }} | docker login --username loveuer --password-stdin gitea.loveuer.com/loveuer
- name: push image to repository
run: docker push gitea.loveuer.com/loveuer/build/ushare:${{ gitea.ref_name }}
# - name: build by kaniko in docker
# run: |
# docker run --rm -v $(pwd):/workspace \
# -v $(pwd)/.docker.config.json:/kaniko/.docker/config.json:ro \
# alpine:latest \
# ls -alsh /workspace
# gcr.io/kaniko-project/executor:latest \
# --dockerfile=/workspace/Dockerfile \
# --context=/workspace \
# --destination=gitea.loveuer.com/loveuer/build/u-api:${{ gitea.ref_name }} \
# --single-snapshot
clean: clean:
if: always() if: always()

View File

@ -32,4 +32,4 @@ COPY deployment/nginx.conf /etc/nginx/conf.d
EXPOSE 80 EXPOSE 80
# 启动服务 # 启动服务
CMD sh -c "ushare & nginx -g 'daemon off;'" CMD ["sh", "-c", "nginx -g 'daemon off;' & exec ushare"]