Compare commits
8 Commits
090253a752
...
v0.1.2-bet
Author | SHA1 | Date | |
---|---|---|---|
6e5bf040dc | |||
1a8827a67a | |||
761b1d3b27 | |||
fb66b2c359 | |||
ad1b096a3b | |||
2d992e36ec | |||
91f3da635d | |||
93c4339039 |
@ -5,7 +5,7 @@ on:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build ushare:
|
||||
build and run u-api:
|
||||
runs-on: tencent-sg
|
||||
steps:
|
||||
- name: prepare enviroment
|
||||
@ -17,6 +17,9 @@ jobs:
|
||||
- name: print operator
|
||||
run: whoami
|
||||
|
||||
- name: print work dir and files
|
||||
run: pwd & ls -alsh .
|
||||
|
||||
- name: print tag name
|
||||
run: echo "Tag name = ${{ gitea.ref_name }}"
|
||||
|
||||
@ -26,29 +29,14 @@ jobs:
|
||||
${{ secrets.DOCKER_CONFIG }}
|
||||
EOF
|
||||
|
||||
- name: print work dir and files
|
||||
run: pwd & ls -alsh .
|
||||
|
||||
- name: build image by docker build
|
||||
run: docker build -t gitea.loveuer.com/loveuer/build/ushare:${{ gitea.ref_name }} .
|
||||
|
||||
- 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
|
||||
- name: build by kaniko in docker
|
||||
run: |
|
||||
docker run --rm -v $(pwd):/workspace \
|
||||
-v $(pwd)/.docker.config.json:/kaniko/.docker/config.json:ro \
|
||||
gcr.io/kaniko-project/executor:latest \
|
||||
'-f /workspace/Dockerfile' \
|
||||
'-d "gitea.loveuer.com/loveuer/build/ushare:${{ gitea.ref_name }}"' \
|
||||
'--single-snapshot'
|
||||
|
||||
clean:
|
||||
if: always()
|
||||
|
@ -32,4 +32,4 @@ COPY deployment/nginx.conf /etc/nginx/conf.d
|
||||
EXPOSE 80
|
||||
|
||||
# 启动服务
|
||||
CMD ["sh", "-c", "nginx -g 'daemon off;' & exec ushare"]
|
||||
CMD sh -c "ushare & nginx -g 'daemon off;'"
|
Reference in New Issue
Block a user