Files
RepoDructor/.gitea/workflows/build.yml
josedario87 c2ac2f02fd
All checks were successful
build-and-deploy / build (push) Successful in 19s
build-and-deploy / deploy (push) Successful in 2s
Remove music directory verification - skip check for containerized runner
2025-08-04 14:31:16 -06:00

51 lines
1.6 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: build-and-deploy
on:
push:
branches: [ main ]
jobs:
#───────────────── build & push ─────────────────
build:
runs-on: docker
env:
REG: gitea.nucleoriofrio.com/nucleo000
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: gitea.nucleoriofrio.com
username: nucleo000
password: 7bc7b2fcd283bd6a251bef3ede368b7f897c919d
- name: Build+push repodructor
run: |
docker build -t $REG/repodructor:${{ github.sha }} -t $REG/repodructor:latest .
docker push $REG/repodructor:${{ github.sha }}
docker push $REG/repodructor:latest
#───────────────── deploy ─────────────────
deploy:
needs: build
runs-on: docker
env:
REG: gitea.nucleoriofrio.com/nucleo000
steps:
- uses: actions/checkout@v3
- name: Login to registry
run: docker login gitea.nucleoriofrio.com -u nucleo000 -p 7bc7b2fcd283bd6a251bef3ede368b7f897c919d
- name: Info about music directory
run: |
echo " Music directory expected at: /srv/repodructor/musica"
echo " Make sure it's mounted and accessible on the deployment host"
- name: Pull fresh images used in compose
run: docker compose pull
- name: Clean up stack
run: docker compose --project-name repodructor down
- name: Update stack
run: docker compose --project-name repodructor up -d --remove-orphans --wait