8 Commits

Author SHA1 Message Date
6e5bf040dc fix: v0.1.2
Some checks failed
/ build and run u-api (push) Failing after 2s
/ clean (push) Successful in 0s
2025-05-09 23:06:21 +08:00
1a8827a67a fix: v0.1.2
Some checks failed
/ build and run u-api (push) Failing after 2s
/ clean (push) Successful in 0s
2025-05-09 23:03:46 +08:00
761b1d3b27 fix: v0.1.2
Some checks failed
/ build and run u-api (push) Failing after 3s
/ clean (push) Successful in 0s
2025-05-09 22:52:32 +08:00
fb66b2c359 fix: v0.1.2
Some checks failed
/ build and run u-api (push) Failing after 3s
/ clean (push) Successful in 0s
2025-05-09 22:45:32 +08:00
ad1b096a3b fix: v0.1.2
Some checks failed
/ build and run u-api (push) Failing after 3s
/ clean (push) Successful in 0s
2025-05-09 22:44:31 +08:00
2d992e36ec fix: v0.1.2
Some checks failed
/ build and run u-api (push) Failing after 2s
/ clean (push) Successful in 0s
2025-05-09 22:11:54 +08:00
91f3da635d fix: v0.1.2
Some checks failed
/ build and run u-api (push) Failing after 2s
/ clean (push) Successful in 0s
2025-05-09 22:10:18 +08:00
93c4339039 init: 0.1.2
Some checks failed
/ build and run u-api (push) Failing after 8s
/ clean (push) Successful in 0s
feat: login page && auth required
todo: file dir cleanup
2025-05-09 17:49:12 +08:00
2 changed files with 13 additions and 25 deletions

View File

@ -5,7 +5,7 @@ on:
- 'v*' - 'v*'
jobs: jobs:
build ushare: build and run u-api:
runs-on: tencent-sg runs-on: tencent-sg
steps: steps:
- name: prepare enviroment - name: prepare enviroment
@ -17,6 +17,9 @@ 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 }}"
@ -26,29 +29,14 @@ jobs:
${{ secrets.DOCKER_CONFIG }} ${{ secrets.DOCKER_CONFIG }}
EOF EOF
- name: print work dir and files - name: build by kaniko in docker
run: pwd & ls -alsh . run: |
docker run --rm -v $(pwd):/workspace \
- name: build image by docker build -v $(pwd)/.docker.config.json:/kaniko/.docker/config.json:ro \
run: docker build -t gitea.loveuer.com/loveuer/build/ushare:${{ gitea.ref_name }} . gcr.io/kaniko-project/executor:latest \
'-f /workspace/Dockerfile' \
- name: login repository '-d "gitea.loveuer.com/loveuer/build/ushare:${{ gitea.ref_name }}"' \
run: echo ${{ secrets.DOCKER_REPOSITORY_PASSWORD }} | docker login --username loveuer --password-stdin gitea.loveuer.com/loveuer '--single-snapshot'
- 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", "nginx -g 'daemon off;' & exec ushare"] CMD sh -c "ushare & nginx -g 'daemon off;'"