Skip to content

Commit

Permalink
feat: 去掉privileged: true
Browse files Browse the repository at this point in the history
  • Loading branch information
a2cd committed Jan 15, 2024
1 parent cefd37f commit aa2f2da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-20.04 # 勿使用ubuntu-latest, 打包后找不到lib依赖
steps:
- uses: actions/checkout@v4 # pull代码
- name: Cache
- name: Setup cache
# 缓存大小10GB, 7天不用清空
uses: actions/cache@v3
with:
Expand All @@ -28,7 +28,7 @@ jobs:
restore-keys: |
prd-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}-
prd-${{ runner.os }}-
- name: Build src
- name: Run build src
run: |
cargo build --release --verbose
- name: Run tests
Expand All @@ -40,7 +40,7 @@ jobs:
registry: ${{ secrets.REGISTRY_DOMAIN }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push image
- name: Run build and push docker image
env:
REGISTRY: ${{ secrets.REGISTRY_DOMAIN }}
NAMESPACE: a2cd
Expand All @@ -64,5 +64,5 @@ jobs:
IdentityFile ~/.ssh/$KEY_FILE
StrictHostKeyChecking no
END
- name: Deploy
run: ssh a2cd 'cd /usr/local/repo/rs-hello-world/ && docker-compose pull && docker-compose up -d'
- name: Run deploy
run: ssh a2cd 'cd /usr/local/repo/rs-hello-world/ && git pull origin main && docker-compose pull && docker-compose up -d'
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
restart: always
environment:
- TZ=Asia/Shanghai
- HELLO=hello
networks:
- main

Expand Down

0 comments on commit aa2f2da

Please sign in to comment.