Compare commits
14 Commits
v0.1.2-bet
...
v0.1.2
Author | SHA1 | Date | |
---|---|---|---|
30f9abbd0d | |||
b2e3649a10 | |||
205e436712 | |||
467cc95bc7 | |||
baa3098253 | |||
9eed7ecaca | |||
6a99e9ba6c | |||
9d96ea1f70 | |||
0dd72d0f53 | |||
58564f9d5e | |||
5c06d03f04 | |||
b207b64466 | |||
139401768f | |||
6da6688677 |
@ -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,14 +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 }} .
|
||||||
'-f /workspace/Dockerfile' \
|
|
||||||
'-d "gitea.loveuer.com/loveuer/build/ushare:${{ gitea.ref_name }}"' \
|
- name: login repository
|
||||||
'--single-snapshot'
|
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()
|
||||||
|
@ -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", "ushare & nginx -g 'daemon off;'"]
|
Reference in New Issue
Block a user