-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cd): add
docker
command to sudo group, so it is do not requires…
… `sudo`
- Loading branch information
1 parent
b893f51
commit e91b084
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,15 +89,15 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub via token | ||
run: sudo docker login -u myshx -p ${{ secrets.DOCKER_HUB_TOKEN }} | ||
run: docker login -u myshx -p ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
- name: Build Server Docker Image | ||
run: | | ||
./tools/scripts/buildJar.sh | ||
sudo docker build . -t myshx/muse-server:${{ github.sha }} | ||
docker build . -t myshx/muse-server:${{ github.sha }} | ||
- name: Push Server Docker Image | ||
run: sudo docker push myshx/muse-server:${{ github.sha }} | ||
run: docker push myshx/muse-server:${{ github.sha }} | ||
|
||
- name: Run Server docker image at home lab | ||
uses: appleboy/[email protected] | ||
|
@@ -110,7 +110,7 @@ jobs: | |
port: ${{ secrets.SERVER_PORT }} | ||
envs: COMMIT_SHA | ||
script: | | ||
sudo docker stop $(sudo docker ps --filter ancestor=muse-server -q) | ||
sudo docker rm $(sudo docker ps --filter ancestor=muse-server -q) | ||
sudo docker rmi $(sudo docker ps --filter ancestor=muse-server -q) | ||
sudo docker run "myshx/muse-server:COMMIT_SHA" -p 50505:80 | ||
docker stop $(docker ps --filter ancestor=muse-server -q) | ||
docker rm $(docker ps --filter ancestor=muse-server -q) | ||
docker rmi $(docker ps --filter ancestor=muse-server -q) | ||
docker run "myshx/muse-server:COMMIT_SHA" -p 50505:80 |