Update deployment workflows and Docker Compose configurations for cloud-pc, mini-pc, and ru-vps services to specify correct runner labels and improve deployment processes.
This commit is contained in:
@@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: cloud-pc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -7,25 +7,24 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: mini-pc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
- name: Deploy changed stacks
|
- name: Deploy changed stacks
|
||||||
run: |
|
run: |
|
||||||
ssh -o StrictHostKeyChecking=no ${{ secrets.MINI-PC_USER }}@${{ secrets.MINI-PC_HOST }} << 'ENDSSH'
|
cd /opt/services
|
||||||
|
git pull
|
||||||
|
for dir in $(git diff --name-only HEAD~1 HEAD | grep '^mini-pc/' | cut -d/ -f2 | sort -u); do
|
||||||
|
echo "==> Deploying $dir"
|
||||||
|
cd /opt/services/mini-pc/$dir
|
||||||
|
test -f docker-compose.yml || { echo "No docker-compose.yml in $dir, skipping"; cd /opt/services; continue; }
|
||||||
|
if grep -qE '^[[:space:]]*build:' docker-compose.yml; then
|
||||||
|
docker compose up -d --build --remove-orphans
|
||||||
|
else
|
||||||
|
docker compose pull
|
||||||
|
docker compose up -d --remove-orphans
|
||||||
|
fi
|
||||||
cd /opt/services
|
cd /opt/services
|
||||||
git pull
|
done
|
||||||
for dir in $(git diff --name-only HEAD~1 HEAD | grep '^mini-pc/' | cut -d/ -f2 | sort -u); do
|
|
||||||
echo "==> Deploying $dir"
|
|
||||||
cd /opt/services/mini-pc/$dir
|
|
||||||
if grep -qE '^[[:space:]]*build:' docker-compose.yml; then
|
|
||||||
docker compose up -d --build --remove-orphans
|
|
||||||
else
|
|
||||||
docker compose pull
|
|
||||||
docker compose up -d --remove-orphans
|
|
||||||
fi
|
|
||||||
cd /opt/services
|
|
||||||
done
|
|
||||||
ENDSSH
|
|
||||||
|
|||||||
@@ -7,25 +7,24 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ru-vps
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
- name: Deploy changed stacks
|
- name: Deploy changed stacks
|
||||||
run: |
|
run: |
|
||||||
ssh -o StrictHostKeyChecking=no ${{ secrets.RU-VPS_USER }}@${{ secrets.RU-VPS_HOST }} << 'ENDSSH'
|
cd /opt/services
|
||||||
|
git pull
|
||||||
|
for dir in $(git diff --name-only HEAD~1 HEAD | grep '^ru-vps/' | cut -d/ -f2 | sort -u); do
|
||||||
|
echo "==> Deploying $dir"
|
||||||
|
cd /opt/services/ru-vps/$dir
|
||||||
|
test -f docker-compose.yml || { echo "No docker-compose.yml in $dir, skipping"; cd /opt/services; continue; }
|
||||||
|
if grep -qE '^[[:space:]]*build:' docker-compose.yml; then
|
||||||
|
docker compose up -d --build --remove-orphans
|
||||||
|
else
|
||||||
|
docker compose pull
|
||||||
|
docker compose up -d --remove-orphans
|
||||||
|
fi
|
||||||
cd /opt/services
|
cd /opt/services
|
||||||
git pull
|
done
|
||||||
for dir in $(git diff --name-only HEAD~1 HEAD | grep '^ru-vps/' | cut -d/ -f2 | sort -u); do
|
|
||||||
echo "==> Deploying $dir"
|
|
||||||
cd /opt/services/ru-vps/$dir
|
|
||||||
if grep -qE '^[[:space:]]*build:' docker-compose.yml; then
|
|
||||||
docker compose up -d --build --remove-orphans
|
|
||||||
else
|
|
||||||
docker compose pull
|
|
||||||
docker compose up -d --remove-orphans
|
|
||||||
fi
|
|
||||||
cd /opt/services
|
|
||||||
done
|
|
||||||
ENDSSH
|
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ services:
|
|||||||
GITEA_INSTANCE_URL: https://git.ada-dev.ru
|
GITEA_INSTANCE_URL: https://git.ada-dev.ru
|
||||||
GITEA_RUNNER_REGISTRATION_TOKEN: ${TOKEN}
|
GITEA_RUNNER_REGISTRATION_TOKEN: ${TOKEN}
|
||||||
GITEA_RUNNER_NAME: cloud-pc-runner
|
GITEA_RUNNER_NAME: cloud-pc-runner
|
||||||
|
GITEA_RUNNER_LABELS: cloud-pc
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ services:
|
|||||||
GITEA_INSTANCE_URL: https://git.ada-dev.ru
|
GITEA_INSTANCE_URL: https://git.ada-dev.ru
|
||||||
GITEA_RUNNER_REGISTRATION_TOKEN: ${TOKEN}
|
GITEA_RUNNER_REGISTRATION_TOKEN: ${TOKEN}
|
||||||
GITEA_RUNNER_NAME: mini-pc-runner
|
GITEA_RUNNER_NAME: mini-pc-runner
|
||||||
|
GITEA_RUNNER_LABELS: mini-pc
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ services:
|
|||||||
GITEA_INSTANCE_URL: https://git.ada-dev.ru
|
GITEA_INSTANCE_URL: https://git.ada-dev.ru
|
||||||
GITEA_RUNNER_REGISTRATION_TOKEN: ${TOKEN}
|
GITEA_RUNNER_REGISTRATION_TOKEN: ${TOKEN}
|
||||||
GITEA_RUNNER_NAME: ru-vps-runner
|
GITEA_RUNNER_NAME: ru-vps-runner
|
||||||
|
GITEA_RUNNER_LABELS: ru-vps
|
||||||
|
|||||||
Reference in New Issue
Block a user